I've worked on a few episerver CMS projects and one thing about developing on them is that it's really time consuming waiting for the initial page to load after a rebuild.
The build itself only takes a few seconds, but when trying to load a page on the epi site, it takes minimum of 3 - 5 minutes before it actually appears.
Although, once the initial page loads, everything else on the site is quick and behaves as I expect it to.
I've asked around, and other epi devs just say it's something they put up with, but my question to you guys, is this really the case? Do you really have to wait a few minutes between each build to test out your changes?
What are some settings I could look at to improve the initial page load speed? Are there any tools you guys would recommend to diagnose where the bottleneck may be?
That is quite slow. Any more than 2 minutes and I would be annoyed.
Does first load feature many blocks, images or content links?
The first load is always slow, because Episerver is loading itself, as well as add-ons and custom initialization modules.Because the content cache is empty, Episerver loads the requested page from the database, including all content items used on that page (one item at a time). On second load, content is served from the content cache.
I usually use dotTrace and SQL Server Profiler to profile a slow site. dotTrace will show which code paths are slow and why. SQL Server Profiler will show if the database queries are the bottleneck.
This https://github.com/episerver/DeveloperTools would be very useful to find out which initialization modules are slow
of course if you want to break down to bare metal level, then suggestion by Stefan (dotTrace + SQL Server Profiler) is still the gold standard
Have you got application insights installed I had to disable it in debug mode as was really slow for me as well
I now have this in my startup.cs
#if DEBUG TelemetryConfiguration.Active.DisableTelemetry = true;#endif
3-5 minutes is a lot.
Some of the things that can affect startup times:
Do you run the code in IIS Express or IIS?
We are experiencing the same slow load times before the first page is displayed. Doesn't mater that it's CTRL F5 or just F5. We've experienced this for over 5 years now. Three minute load time is killing coding productivity.
@Eric, Have you followed Quan Mai's suggestions above?
We have version 3.50 of EPiServer.DeveloperTools installed. I havn't looked at it myself. I did run /episerver/Shell/Debug/ShowTimeMeters and it was about 30 seconds total executaion for all episerver.
Question. When I go to loacalhost/episerver, Developer Tools isn't anywhere to be found although it is installed.
Just got Developer Tools working and we are seeing over 4 minute load times for our project. If we remove episerver, the loadtime is almost instantanious. Developer Tool shows episerver reources take between 30 to 60 second to load when ran from Visual Studio. Our developers are seeing over one hour per day in total wait time for the site to come up when ran from Visual Studio 2019. This has been happening for over five years.