1

I have several user controls loading up in a template in an Umbraco website, and basically, there are problems with a certain template loading very slow initially (after that it loads fast). But the initial page load can take up to 5 minutes to load and the CPU on the localhost goes up very high during this. This is only on 1 specific template. I have tried a stack trace and still not able to output anything useful. Is there something in code where I can set breakpoints somehow in the code itself to see where it is spending most of it's time on the server before the page gets rendered to the client side?

I need to understand, that when the page is not cached, why it takes up to 5 minutes to render the page. How can I find this out in code? Preferably with breakpoints or some ASP.NET plugin that will help me understand why this is happening?

I have determined that it is not related to IIS 7.5, and it is NOT a System Hang! It is something in the code that is causing this.

Solomon Closson
  • 6,111
  • 14
  • 73
  • 115

1 Answers1

0

Glimpse should provide...a glimpse into what is causing the slow initial load without requiring you to write profiling code just to troubleshoot the issue. It is certainly worth checking out before doing the latter at least.

Also, StackExchange's MiniProfiler looks promising and may be worth checking out.

The fallback option of instrumenting your code to time its execution will be more work and require code changes of course; but if that proves to be your best option to understand the slow load times, so be it.

Community
  • 1
  • 1
J0e3gan
  • 8,740
  • 10
  • 53
  • 80
  • Have tried installing Glimpse... than, because it did not work, I removed it, but now I get this error on every page of the website: `Could not load file or assembly 'Glimpse.Core, Version=1.8.2.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.` How do I fix this now? – Solomon Closson Apr 06 '14 at 05:56
  • The error is this in Visual Studio: `Error 1 Reference.svcmap: Could not load file or assembly 'Glimpse.Core, Version=1.8.2.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified. App_WebReferences/ServiceAdminIDSS.` – Solomon Closson Apr 06 '14 at 05:58
  • Glimpse has ruined the site! Thank you, but it will now not remove itself! – Solomon Closson Apr 06 '14 at 06:10
  • @SolomonClosson: What did not work? Revert from source control if you need to get back to a known state of course. – J0e3gan Apr 06 '14 at 06:24
  • Well, after installing Glimpse, said to go to an `.axd` file from my site project. I went to that file and than it said all kinds of ASP.NET errors popping up on the page. Anyways, got the site back up and running by removing the Glimpse.webforms.dll file in the `Bin` directory of the website. Seems it did not remove that file upon uninstallation – Solomon Closson Apr 06 '14 at 06:27
  • Also, I have tried timing my code, and there is nothing wrong with my code: `DateTime start = DateTime.now();` And at the end of the method, `DateTime end = DateTime.now(); LogintoDatabase: start + " : " + end;` The start and end times are exactly the same everytime! – Solomon Closson Apr 06 '14 at 06:32
  • Thanks, wound up using Glimpse, and managed to get it working with NuGet. Cheers :) – Solomon Closson Apr 07 '14 at 19:51