1.3 debugging an order of magnitude slower than with 1.2

Topics: Troubleshooting
Oct 6, 2011 at 10:23 PM
Edited Oct 6, 2011 at 10:33 PM

Hi all!

I always build Orchard from the source, always got from the latest default branch. After updating to 1.3 I noticed a dramatic slowdown in loading times. Build is as fast as with 1.2, but after the dev server starts, pages load for ages, ridiculously slowing down development.

Some measurements:


  • initial load time (home page after dev server starts for the first time): 18.90s
  • dashboard: 3.11s
  • home page from the second try: 0.44s

The same for 1.3:

  • initial load time: 52.90s
  • dashboard: 6.29s
  • home page from the second try: 1.46s

Loading times were measured with Fiddler, setup was with the default modules (enabled as they were) and theme. The machine is i7@3,2Ghz, RAM is not an issue. Both versions run from the same HDD.

I have tried every trick mentioned to slow down ASP.NET MVC debugging, but no luck. I suppose the problem lies in the dev server, as running the same instance of Orchard from WebMatrix (the site added from the Orchard.Web folder) is literally to a hundred times faster (with pageloads typically below 1s or even 0,1s for content pages). In contrary to that, building the site in release mode and running with the dev server, the metrics are practically the same as with debugging.

I even tried on of my modules with both versions. The same code runs 10 times slower on 1.3.

Is there a way I could provide additional info to help investigate the problem?

Edit: plenty of exceptions are thrown from various places in Orchard (e.g. a favorite being "'ShapeProxy61fde97b9ea74c6ea71f8bb357735fa9' does not contain a definition for 'Footer'"), but I thought these were only because I've run the site on my dev machine, not a proper server. 1.3 has more exceptions, maybe this contributes to the problem. If I sent an IntelliTrace summary would it help?

Oct 6, 2011 at 10:48 PM

WE are seeing slower cold-starts in debug mode, yes. Investigting. Thanks for reporting it.

Oct 7, 2011 at 12:55 AM

Actually something else must be going on. Both Sébastien and I did a comparison and did not find a significant difference on cold starts between 1.2 and 1.3 (it's not fast but there is no regression that we could see). Other requests were quite fast, consistently.

Oct 7, 2011 at 9:44 AM

I'm quite clueless, then. Not only cold starts (meaning first page load after build and first loadings of pages) are slower, but subsequent pageviews too. The example with my own module I mentioned is a service method with some calculations and DB access through repositories and the ContentManager. It's ten times slower than with 1.2 on "warm" page loads.

I really can't think of anything causing this other than something inside Orchard, as I measured the runtimes with 1.2 in the very same Visual Studio installation (so there are no other firewalls, virus scanners, server softwares or whatever running that could mess with http communication).

Update: I now measured two absolutely clean installations of Orchard, built from the freshly downloaded sources, cooked with the Default recipe, using SQL Server Compact (metrics in seconds), and can't experience slowdowns either. It looks that some module is messing up even when not enabled. I will investigate this.


Oct 7, 2011 at 10:06 AM

Now I tried a fresh installation, slowly adding every module I previously had and I experienced no slowdown! The good news is that I was wrong and the 1.3 version is not slower :-). The bad news is, there is indeed a slowdown with the other installation, and I don't know why. But since it was only some test, I think I won't bother with investigating it further.

Oct 7, 2011 at 3:56 PM

Now I also copied the App_Data to the new installation, still no problem. Since the old one was updated with TortoiseHg from the latest default branch, the two installations should be identical. Still, even wiped out, the old is slow as hell.

So this is quite mysterious, but since transferring App_Data and the module folders to a new installation solves the issue, there is no real problem. Anyway, now I can be fully happy with Orchard 1.3 :-).

Oct 7, 2011 at 7:06 PM

Well, thanks for the investigation. If somebody else is experiencing this, we'll see.

Oct 7, 2011 at 9:36 PM

I hope this might will be helpful in the future, but I really hope this will never happen to anybody :-).