Watch out, IsDerived() is killing your server!

Last week we had a problem with one of our clients with their Sitecore site on Azure Paas. The site has been getting slower over time and Azure statistics were showing very high CPU usages. Long story short, one of the major bottlenecks we had was the use of IsDerived(). It was used quite frequently … Continue reading Watch out, IsDerived() is killing your server!

Advertisements

Making use of Sitecore’s Switcher to manage logger contexts

I'm sure you've used Sitecore.Common.Switcher<T> in your Sitecore projects numerous times, for example when disabling all security checks when editing items in code using the SecurityDisabler: using(new SecurityDisabler()){ // Edit Sitecore items } SecurityDisabler indirectly inherits Sitecore.Common.Switcher<T> which allows such behavior. There are other examples such as SiteContextSwitcher or DatabaseSwitcher. The cool thing about this is that it allows … Continue reading Making use of Sitecore’s Switcher to manage logger contexts

Tips & Tricks: Sitecore Log file naming

When I started working with Sitecore, I always wondered how Sitecore names its logs. Sometimes you would see a date only as the name e.g. log.20170214.txt and sometimes a date and a time e.g. log.20170214.165444.txt. Keep in mind that Sitecore uses Log4Net as the logging framework so you'll need to read more about it if you're … Continue reading Tips & Tricks: Sitecore Log file naming