EpiServer startup slow

Vote:
 

I'm developing on a EpiServer site. When the site starts it takes several minutes and you can see what happens in the VS.NET diagnostic tools. There are a lot of database calls (200+). E.g. netPageDefinitionGet, netPageDefinitionList.

From what I understand the results of this will be inserted into the EpiServer cache. The site performs well when started.

This isn't really a problem med running the site, it's a problem when developing. Since this delay happens every time a developer starts the debugger, this causes lot's of wait time for all developers..

Any suggestions? Is it possible to keep the cache e.g. out of process between debugging sessions?

#143937
Feb 03, 2016 15:13
Vote:
 

For me it works best when running it in local IIS and then attach the debugger to the w3wp service

#143938
Feb 03, 2016 15:17
Vote:
 

In  devlopment we're running a local IIS but the database is remote. Thanks for the tip I'll check if that speeds it up :) But is this a common problem when devoping with EpiServer. I'm new to EpiServer, mabye I will just learn to wait ;)

#143939
Edited, Feb 03, 2016 15:22
Vote:
 

I also attach debugger manually. Good network speed to database is really important when developing so might be a good idea with a local copy of db if you have slow connection to db. There are a lot of db calls at start up of site. 

#143943
Feb 03, 2016 15:44
Vote:
 

I like this VS extension for easy "attach" without having to look for the correct process: https://visualstudiogallery.msdn.microsoft.com/d0265ab0-df51-4100-8e10-1f84403c4cd0

I would also recommend always using local db and "blobs". You should also do a Profiling session with VS or dotTrace or similiar to find out if it's equally slow when just starting up outside of debugging.

#143975
Feb 04, 2016 9:38
Vote:
 

I use a similar extension called reattach

https://visualstudiogallery.msdn.microsoft.com/8cccc206-b9de-42ef-8f5a-160ad0f017ae

Works great!

Avoid using edit mode while debugging if you don't need to. Avoid being logged into site if you don't need to while testing public functionality. 
I would actually say that the speed of developing is one of EPiServers strong points. With local db and resource files you can get down to a few seconds startup time after recompiling. That's pretty amazing compared to Sitecore and other CMSes. 

#143986
Feb 04, 2016 11:01
Vote:
 

I've now been developing on this system for a few months. And tried all the things mentioned above. It's still superslow (like a few minutes) to start EpiServer when hitting start debugging in VS.NET.

What happend is that as said before, EpiServer primes caches, mabye this is caused by how the system is designed, menus, submenus etc. It's a web forms implementation.

I've even debugged EpiServer core code by using .NET Reflector / SQL Profiler. And there are over 2 500 queries to the database when the site starts.

I think the only thing that could work is to put EpiServer cache out of process so that it keeps it state between debugging sessions.

What I like to do is to put the EpiServer cache in e.g. Redis or Scale out State Server, does anyone here done this, or know if it can be done?

#154948
Sep 03, 2016 12:03
Vote:
 

I would personally look at why its taking so long to start, a well built Episerver site should not take a couple of minutes to load when using a local SQL instance (recommended when developing). From what you are saying it sounds like one of the following could be happening:

  1. Someone is doing somethig slow (like using FindPagesWithCriteria or iterating and hitting a non-cached API call) and caching the result as they know it's slow. As you said this is fine once running but not very good when developing!
  2. An Episerver Initialisation module is doing some slow work to build the cache, however it takes a while!

To address item 1. you can try clearning down the content in your dev DB as if you have a large tree and API methods are being executed against it then it could slow things down on start up. 

You can investigate item 2. by looking at the start up performance by using the debug tools as I blogged about here: http://www.david-tec.com/2015/02/episerver-debugging-tools/.

David

#154949
Sep 03, 2016 18:13
Vote:
 

Ps you can also try installing Prefix to see if you can profile out where the issue is: http://www.prefix.io

#154950
Sep 03, 2016 18:15
Vote:
 

David, Prefeix is awesome! Been using that for couple of weeks now :)

#154954
Sep 04, 2016 17:58
Vote:
 

Wow, that was a great tool!! Thanks David!

#154957
Sep 05, 2016 8:15
Vote:
 

Havent tried that tool yet. Looks great!

#154959
Sep 05, 2016 8:50
Vote:
 

Guys, you need to read more my tweets ;)

#154960
Sep 05, 2016 8:50
Vote:
 

I do :) Now Ive tried it. Looks better than glimpse that I normally use. I like that it doesnt need a lot of dll dependencies like glimpse.

#154965
Sep 05, 2016 12:31
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.