Why ASP.Net applications delay so much to load pageshttp://forums.asp.net/t/1764806.aspx/1?Why+ASP+Net+applications+delay+so+much+to+load+pagesTue, 21 Feb 2012 12:38:48 -050017648064811014http://forums.asp.net/p/1764806/4811014.aspx/1?Why+ASP+Net+applications+delay+so+much+to+load+pagesWhy ASP.Net applications delay so much to load pages <p>New hard drive, new motherboard, new RAM, new processor ... new PC (upgraded)</p> <p>I have just iinstalled everything new, from scratch, in my PC: WinXP Pro, VS2010, SQL Server 2008 R2</p> <p>Even like this, sometimes ASP.Net applications delays a lot of time loading pages</p> <p>I have seen this also in the past and I tought it might be some issue with my PC or some bugs with my old installed software or memory problems or anything else <strong>but ASP.Net being slow on its own</strong></p> <p>It is me , my way of feeling or it comes simply to be that ASP.Net applications are slow in performance?</p> <p>I have tried also deploying feature but sometimes it freezes and it freaks you out because when it comes to your customers, working in real life situations, they don't care any other thing than responding rapidly to their customers waiting on the line</p> <p>Is ASP.Net slow? </p> <p>I'm afraid of asking this: Any tool for impoving its performance?</p> <p>Afraid of receiving an answer which will mean taht this is really an issue and not a simple perception of my own</p> 2012-02-01T15:30:10-05:004811046http://forums.asp.net/p/1764806/4811046.aspx/1?Re+Why+ASP+Net+applications+delay+so+much+to+load+pagesRe: Why ASP.Net applications delay so much to load pages <p>Who is your webhost Topolov? If its GoDaddy, I can explain why. What they do is if the site is not hit within a few minutes, they shut down the application pools which in turn results in rebuilding the application which can give your site the appearance that it has hung. It isn't. There is one application&nbsp;that they give you a windows service in which you can keep doing a get on your pages. </p> <p><a href="http://kapie.com/2009/09/26/webapp-keepalive-service">http://kapie.com/2009/09/26/webapp-keepalive-service</a></p> <p>The other option if you have access to the web server is a Keep Alive Service for IIS. You would install this on the IIS itself. <a href="http://keepalive.codeplex.com/">http://keepalive.codeplex.com/</a></p> 2012-02-01T15:44:10-05:004811066http://forums.asp.net/p/1764806/4811066.aspx/1?Re+Why+ASP+Net+applications+delay+so+much+to+load+pagesRe: Why ASP.Net applications delay so much to load pages <p>Thank you for responding so fast</p> <p>I'm talking about my own deployments. By the way, is not my firts one. I have been deploying applications since VS2003 old times</p> <p>I do nothing special to deploy (now I use the deployment option sometimes) which I understand speeds up applications because it pre-compiles all code at once not waiting the firts time load on the user's side in order to do that</p> <p>I just do it the normal way it has been done using IIS. Nothing more</p> <p>PS.S: I HOST MY APPLICATIONS ON THE SERVERS OF MY CUSTOMERS</p> <p>But even like that, ASP.Net hangs a little while deploying on its own intrinsic development web server</p> 2012-02-01T15:53:40-05:004811070http://forums.asp.net/p/1764806/4811070.aspx/1?Re+Why+ASP+Net+applications+delay+so+much+to+load+pagesRe: Why ASP.Net applications delay so much to load pages <p>Ok, now that is interesting. Does this slowness occur each time you open the page or just on the first time? Keep in mind, even if the page is pre-compiled, it still has to load the dll files into memory which can take a few anyway. Have you tried running these apps on a different machine to see if they work better elsewhere?</p> 2012-02-01T15:55:32-05:004811106http://forums.asp.net/p/1764806/4811106.aspx/1?Re+Why+ASP+Net+applications+delay+so+much+to+load+pagesRe: Why ASP.Net applications delay so much to load pages <p>Specifically I'm talking about&nbsp;my newer applications, based on EF ASp.Net Dynamic Data C#</p> <p>To be true I can tell you that I can see that behavor in applications which have a lot of entities and the database model has all its linking made through Foreign Keys relationships</p> <p>The model and MetaData logic works marevouslly this way but sometimes (<em>and not just with tables that have a lot of relationships defined from-to it but also in others rather simple</em>) it also hangs up (or waits a little too long) to display non-complicated tables</p> <p>I know you're going to tell me that a lot of this will depend on database schema definition but it is also true that real life applications are not simple and that they are expected to work well to be used in business</p> <p>Moreover, SQL Server is a 1st class engine for managing 1,000,0000 of records without much trouble, sin't it?</p> <p>I must also say that I have also defined a good structure for my indexes so searching (queries) is made based on pre-defined criteria</p> <p>What I'm trying to say is that I can understand that the engine waits a little if you're making a query which involves querying all of the records in a table but this s not the case</p> <p>It happens sometimes with simple tables with little records</p> <p>Have you ever seen or hear about this situation before?</p> 2012-02-01T16:10:44-05:004811118http://forums.asp.net/p/1764806/4811118.aspx/1?Re+Why+ASP+Net+applications+delay+so+much+to+load+pagesRe: Why ASP.Net applications delay so much to load pages <p>Ok, you answered one of my db questions about indexes. Good. Now, are you putting any of your controls inside update panels? If your update panel viewstate gets too big that can bring your site to a crawl. Its happened to me before. My viewstate was nearly a whopping 1.2 megs (not my design <img src="http://forums.asp.net/scripts/tiny_mce/plugins/emotions/img/smiley-smile.gif" alt="Smile" border="0" title="Smile">&nbsp;) so I had to redesign the interface to use JQuery. The UI was fine for this dropdown list until it hit about 2000 records. I would say try running fiddler on it to see just how large the viewstate is.</p> 2012-02-01T16:15:54-05:004811147http://forums.asp.net/p/1764806/4811147.aspx/1?Re+Why+ASP+Net+applications+delay+so+much+to+load+pagesRe: Why ASP.Net applications delay so much to load pages <p>I am using the normal ASP.Net Dynamic Data application with C#</p> <p>It uses 5 basic pages based on templates</p> <p>In my case I use just one page: ListDetails.aspx</p> <p>Dynamic Data does all scaffolding in that one single page</p> <p>ListDetails.aspx uses two components: A GridView and a FormView</p> <p>So customization of business rules comes in the form of &quot;Partial Classes&quot; and &quot;MetaData&quot; definition files</p> <p>I will&nbsp;mention this just for you to know: documentation on intermediate to advanced issues scarce on ASP.Net Dynamic Data so there might be a little guilt on our own customization of the code for some pages</p> <p>But, it seems that the whole interactivity among complex and single pages carries a little disruptions to the web server and it seems that maybe Dynamic Data roundarounds waste its potential, or maybe it uses heavily some kind of extensive paging/caching that can't be discarded at once and hangs while it unloads previous data and loads newer one</p> <p>I'm just guessing but it might be that the stock pile of RAM that is being used by Dynamic Data collapses and it takes a while to rebuild it or re-defiine it</p> <p><strong>EXCUSE ME FOR THINKING OUT LOUD. I'm just guessing</strong></p> 2012-02-01T16:31:30-05:004811152http://forums.asp.net/p/1764806/4811152.aspx/1?Re+Why+ASP+Net+applications+delay+so+much+to+load+pagesRe: Why ASP.Net applications delay so much to load pages <p>Hmmm, now that is curious indeed. I would still fire up fiddler and just examine the crosstalk between client and server. Even if you arne't using updatepanels and all, if your viewstate is large, that can slow performance.</p> 2012-02-01T16:33:52-05:004811175http://forums.asp.net/p/1764806/4811175.aspx/1?Re+Why+ASP+Net+applications+delay+so+much+to+load+pagesRe: Why ASP.Net applications delay so much to load pages <p>I might be wrong here but it seems to me that ASP.Net Dynamic Data doesn't use at all ViewState</p> <p>The data flips-flop in its inside. It comes and goes (it seems randomly but it certainly obbeys to the way Dynamic Data manages its data)</p> <p>So there's noway for you (programmer) to use PostBack and some other natural tools (of course that guys like Stephen Naughton will probably say that it does, but he's a guy out of this world.) I'm talking about normal, limited people</p> <p>There's no way because you must rely on the availability of data that the frameworks provides you at difefrent stages, let's call it methods and mostly &quot;Events&quot;</p> <p>Depending on the nature of the event, then you have &quot;some&quot; data available BUT IT SEEMS THAT YOU (PROGRAMMER) CAN'T CARRY ON DATA ON YOUR OWN BUT JUST BY MAKING USE OF A LOT OF IMAGINATION </p> <p>I mostly use Session variables which by the way is a nightmare because you must know when and how to use it and mostly ... you must know when to discard and reset that info so you don't mess Dynamic Data natural behavior with your own messy code</p> <p>Sorry for mentioning this. Don't know where to go</p> 2012-02-01T16:44:59-05:004811193http://forums.asp.net/p/1764806/4811193.aspx/1?Re+Why+ASP+Net+applications+delay+so+much+to+load+pagesRe: Why ASP.Net applications delay so much to load pages <p>I understand what you mean. Have you tried running the debugger against the site (I'm talking about where the slowness is happening) so that you can actually step through the processes to see what its doing? I can't think of any other way to know what's happening. Again, without us being able to see your project, its very difficult for us to pinpoint where the problem really is.</p> 2012-02-01T16:52:43-05:004811506http://forums.asp.net/p/1764806/4811506.aspx/1?Re+Why+ASP+Net+applications+delay+so+much+to+load+pagesRe: Why ASP.Net applications delay so much to load pages <p>Let me say this and I want to make it clear that I am not changing the original subject of my question. You'll see later that I'm maintaining my original question here. I'm just making my question richer so you can help finding out why ASP.Net performance degrades sometimes</p> <p>Naughton's answer in a recent post comes like this:</p> <p></p> <blockquote><span class="icon-blockquote"></span> <h4>greatbear</h4> <p></p> <pre class="prettyprint">protected void Page_Init(object sender, EventArgs e) { table = DynamicDataRouteHandler.GetRequestMetaTable(Context); GridView1.SetMetaTable(table, table.GetColumnValuesFromRoute(Context)); GridDataSource.EntityTypeFilter = table.EntityType.Name; if(table.Name.Equals(&quot;Employee&quot;) GridDataSource.Where = &quot;it.DEPT&gt;3000&quot;; }</pre> <p></p> </blockquote> <p></p> <p>If you see here in the code below,</p> <p>table = DynamicDataRouteHandler.GetRequestMetaTable(Context);</p> <p>&quot;table&quot; is a variable of the type DynamicDataRouteHandler.GetRequestMetaTable(Context) NOT A STRING</p> <p>But Dynamic Data maintains its properties just when it is executing that piece of code. After that &quot;table&quot; IT'SGONE</p> <p>There is no way of recreating that sentence but in that very method</p> <p>I'm saying this in order to show you something I was telling you before: programmers need help with customization and the lack of documentation makes you write messy code which might as well be avoided if proper training were published on Dynamic Data</p> <p>Coming to our point:&nbsp; don't know if that pieces of code might be interfering with ASP.Net performance</p> <p>BUT THERE IS NO WAY OF CHECKING THIS OUT BY MEANS OF WHAT YOU SAID: DEBUGGING</p> <p>Maybe with any other tool but Dynamic Data. No way to do that Jose!</p> <p>Thanks</p> 2012-02-01T21:36:47-05:004811641http://forums.asp.net/p/1764806/4811641.aspx/1?Re+Why+ASP+Net+applications+delay+so+much+to+load+pagesRe: Why ASP.Net applications delay so much to load pages <p></p> <blockquote><span class="icon-blockquote"></span> <h4>bbcompent1</h4> <p>I understand what you mean. Have you tried running the debugger against the site (I'm talking about where the slowness is happening) so that you can actually step through the processes to see what its doing? I can't think of any other way to know what's happening. Again, without us being able to see your project, its very difficult for us to pinpoint where the problem really is.</p> </blockquote> <p></p> <p>It happens randomly, with any table: after choosing from the main menu, while trying to show a grid</p> <p>No way to determine a point in which it happens</p> <p>That's why I started installing everything from scratch: my CPU and software</p> <p>It behaves the same either in previous or newest condition</p> <p>Not really much records in my database. Tables are empty so I'm starting data entering also from scratch</p> <p>Any idea?</p> <p>&nbsp;</p> 2012-02-02T01:19:47-05:004812460http://forums.asp.net/p/1764806/4812460.aspx/1?Re+Why+ASP+Net+applications+delay+so+much+to+load+pagesRe: Why ASP.Net applications delay so much to load pages <p>I hate to admit it but I'm really stumped, especially now that you say it happens at random. About the only thing I could think that would cause that would be the application pool timeout being exceeded but that is a longshot. Usually, when the app pool goes to sleep (yes, this really does happen - GoDaddy is a great example of that) the application code has to be rebuilt which can take upward of 30 seconds to a minute depending on how much code you are loading, even with compiled DLLs. Beyond that, I have no other ideas.</p> 2012-02-02T10:27:24-05:004816420http://forums.asp.net/p/1764806/4816420.aspx/1?Re+Why+ASP+Net+applications+delay+so+much+to+load+pagesRe: Why ASP.Net applications delay so much to load pages <p>So, what from here/</p> <p>No ASP.Net Booster or something like that?</p> <p>How can you effectively trace ASP.Net but not with the debugger but any other useful tool (believe me, if you were working with Dynamic Data VS2010 debugger doesn't really help much for this purpose)</p> 2012-02-04T16:19:34-05:004818367http://forums.asp.net/p/1764806/4818367.aspx/1?Re+Why+ASP+Net+applications+delay+so+much+to+load+pagesRe: Why ASP.Net applications delay so much to load pages <p></p> <blockquote><span class="icon-blockquote"></span> <h4>Topolov</h4> No ASP.Net Booster or something like that?</blockquote> <p></p> <p>Sorry but no, there is no such thing. I don't have an answser for you here, sorry.</p> 2012-02-06T10:40:04-05:004819301http://forums.asp.net/p/1764806/4819301.aspx/1?Re+Why+ASP+Net+applications+delay+so+much+to+load+pagesRe: Why ASP.Net applications delay so much to load pages <p>Ok. I have a clue here</p> <p>Today, ASP.Net started hanging up loading a page in ite very begining, loading the main menu</p> <p>It seems to me that there's something wrong between the comunication established with Asp.net and the web server</p> <p>Thta's funny,&nbsp;isn't it?</p> 2012-02-06T20:19:07-05:004837151http://forums.asp.net/p/1764806/4837151.aspx/1?Re+Why+ASP+Net+applications+delay+so+much+to+load+pagesRe: Why ASP.Net applications delay so much to load pages <p>.... and ..... ?????</p> <p>There will be any future feedbackon this or have we reache a dead end storey?</p> 2012-02-17T06:39:03-05:004843151http://forums.asp.net/p/1764806/4843151.aspx/1?Re+Why+ASP+Net+applications+delay+so+much+to+load+pagesRe: Why ASP.Net applications delay so much to load pages <p>Ok, if its hanging on the main menu, then you would want to run Fiddler to see what the heck its doing. The problem could be a large viewstate which is common with AJAX Toolkit Controls.</p> 2012-02-21T12:38:48-05:00