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?