EPiWiki.se  - EPiServer notes shared with others
 

Common performance mistakes when developing for EPiServer

[Edit]
A list of common performance mistakes when development with EPiServer and ASP.NET for larger sites with a lot of page request and many pages. The list is ordered by the most frequent errors at the top.

Don’t hit the database in each request


If the database is hit on each request the database will get a high load.

Cache empty/null values and errors


If empty/null values is not cached the query will be asked on each request to show noting-

Use correct Virtual path provider


See

3rd part system


Ensure that only one request accessing 3rd part system, this can be done by using a cached proxy when communicate with 3rd part system, or preload the data with a scheduled job.

Don't attach to events that are used a lot


DataFactorys PageLoad events are going to be accessed each time a page is loaded and can make a listing in EPiServer take very long time.

Statistics


Statistics generates a lot of traffic that has to be aggregated, both over time and over the number of pages. The EPiServer log service sample analyzer (TimeSpanAnalyzer shows an example how to implement aggregation over time, but misses to aggregate over number of pages – if you going to use it rewrite it so it dosen’t use Object store)

Locking


Locking can be an issue in both low CPU hangs (some functionality locking other so it can’t deliver data) and high CPU usage (the context switching for many threads can take a lot of CPU).
Version author:
Mattias Lövström

EPiServer version

All