How to load aspx pages faster?

I have a (big) problem that all of you working with Webforms may have.

The problem is the time to load the page . Using localhost (witch should be the fastest way) in Vista (IIS 7) I get this graph

alt text http://www.balexandre.com/temp/2009-06-29_1302_soquestion.png

source link to file

as you can see, it takes more than 17 seconds to show the page !!! and only 2 seconds to load the page yourself ...

I use the ASP.NET AJAX framework to work with web parts.

How can I reduce this to 17 seconds?

Any idea of ​​where to go is greatly appreciated :)


Added: Check the correct answer from Jan Zich

I tested the change

<asp:ScriptManager ID="sm" runat="server" /> 

in

 <ajax:ToolkitScriptManager ID="sm" runat="server" CombineScripts="true" /> 

and the result using FireBug is impressive (half the time, not using the cache!), as you can see in the image below

alt text http://www.balexandre.com/temp/2009-06-29_1543_soquestion.png

source link to file

and with CSS and jQuery files cached , it drops to half!

alt text http://www.balexandre.com/temp/2009-06-29_1550_soquestion.png

source link to file

+4
source share
3 answers

This is not considered the right answer because I don’t know how to fix it, but the problem is that most browsers (besides Safari and Chrome) load JavaScript sequentially, because you need to wait until the previous script is finished (as this may change the document) . This is usually fixed by combining all the JavaScript files into one.

Edit: Related question: How to combine WebResource.axd and ScriptResource.axd files to reduce the number of requests to my ASP.NET server? . In addition, I do not see which scripts you actually include in the screenshot, but most likely these are your own scripts. Is there a way in your application to combine them in some way?

+4
source

Remember that when debugging mode is enabled (in web.config: <compilation debug="true" >), resources such as javascript files, images and CSS files are not cached by the browser.

Therefore, in a production environment (with debugging disabled), these numbers may look different, since the browser will cache most of the resources and not request them again for each page / request.

+1
source

Are you using an UpdatePanel that loads a lot of data? If so, the page will not be displayed until it retrieves all the data.

It is possible to extend the UpdatePanel, but to show it before loading your data - this article describes how to do it (alas, in Dutch, but I think that the comments inside the code were in English)

0
source

All Articles