Our monthly Virtual Happy Hour is happening this week, Fri Feb 23!
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?
For me it works best when running it in local IIS and then attach the debugger to the w3wp service
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 ;)
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.
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.
I use a similar extension called reattach
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.
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?
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:
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/.
Ps you can also try installing Prefix to see if you can profile out where the issue is: http://www.prefix.io
David, Prefeix is awesome! Been using that for couple of weeks now :)
Wow, that was a great tool!! Thanks David!
Havent tried that tool yet. Looks great!
Guys, you need to read more my tweets ;)
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.