Hello Sitecore Enthusiasts!
We all love Developing and extending Sitecore CMS not just for the enterprise use that we do in our company, but even to know what sitecore is, how it works, use various Shared Source Module ,to know what some great developers have put up and trying to make some things of your own. Also, there are many reasons for a Sitecore instance to restart, some code change and building it to apply changes, config change, change in some file present in webroot and so on. But while doing this, we all at some point of time face one difficulty. A Slow running application in Local Development Environment rite?
My Local Development Sitecore Application is running very slow!! And its hindering me from getting to explore Sitecore More!!
Ok then lets solve this one.
Some things that I found to be very useful while working with Sitecore in Local Environment are as follows:
1. Tweak Cache Sizes
Generally, speaking of the Caches, they are actually used in a production environment, where there is a huge amount of data moving to and fro. But as far as a development instance is concerned, its better we keep them small — specially the Prefetch cache.
Also, make sure that the MemoryMonitor Hook is not too high a value.
Choose your cache sizes appropriately. Best way would be hit and trial method, wherein you may need 2-3 trials to know what is the best optimal cache size, but once you get it, they will work wonders for you.
But remember, that in live its better that you provide a very good amount of cache size — the more the cache, the better the performance, — as it will surely reduce the database hits and inturn reduce the response time of your application.
There is a shared source module called the Cache Tuner which you can use to do this for your live Sitecore Instances.
2. Disable Performance Counters for the development instance
This can prove to be very helpful. In a development instance, this is not required, its for the live production environment application, wherein you need to know the bottleneck of your application and hence you enable them.
While, in a development machine, it can prove to be not just futile but even an hinderance, as the Sitecore instance will check for them and log them in the log files. Better stop them.
This can be done using a config change in Web.Config. Change this setting value to false.
<setting name="Counters.Enabled" value="false" />
3. Disable unrequired agents
Now actually, you don’t require the various scheduling agents running as background processes to run in your local environment. They are actually meant to run on the Live environment, and have their specific purpose, say the CleanupPublishQueue – cleaning up items from th Publish Queue Table and so on.
The various agents are:
- Sitecore.Tasks.CleanupHistory – for cleaning up your History Table
- Sitecore.Tasks.CleanupPublishQueue – for cleaning up your PublishQueue Table
- Sitecore.Tasks.CleanupEventQueue – for cleaning up your EventQueue Table.
- Sitecore.Tasks.CleanupAgent – for cleaning up your Website Media Cache.
For more understanding on Agents and Scheduled tasks, please refer to the following posts:
4. Try Cleanup Databases and Rebuild Indexes
Well, its better not done, but in case tweaking caches doesn’t work for you, better you try this step.
It may happen, that you haven’t done any database maintenance and there are a lot of items in your database, making it bulky and difficult to manage. This step can help cleaning up the tables and rebuild of indexes help the application to come up fast as the items are found faster.
Also, along with this, you can truncate some of your Database Tables — like PublishQueue (in case you don’t use Incremental Publish), History Table, EventQueue Table — but before you do so, please consult Sitecore Support, as it is a very imp step that you might be taking.
Friends, the four steps that I have mentioned above, are the ones that I have tried on my Local Development Instance, and Man! Its very fast now.
Generally, you actually won’t require the 4th Step, by the end of 3rd step itself, you will find your instance to be superfast! Still, please post your experiences in comments in case any of these 4 steps don’t help you accelerating your instance. I will try my best to help you out!
So my dear Sitecore Lovers, Happy Accelerating Sitecore Instance!