I'm updating and saving a page using the ContentService.SaveAndPublishWithStatus(myUmbracoContent). It works great, but it's pretty slow. Not super slow, but slow. Each call takes around 1200 - 1500 ms.
In the attached image you can see the call structure and execution times.
When I peek inside the SaveAndPublishWithStatus method I noticed it does several things, such as updating and refreshing the pagecache.
Our content tree is pretty big, and hence the xml cache file is big aswell, around 40Mb. I was thinking if this is an issue when updating and refreshing the cache, performance-wise.
Also, I was wondering if there are any overloads or tweaks for the SaveAndPublishWithStatus method I can do to optimize it? Logging configuration, cache settings (I'm new to the Umbraco cache) etc.
You can turn off using of XML cache, go to /config/umbracosettings.config -
XmlCacheEnabled: Turn Xml caching of content on/off. Umbraco Makes heavy use of caching content in memory to avoid database calls. This makes umbraco faster and more efficient. You should not in any way turn this off, unless you have a very good reason to do so. It will make your website very slow.
Poor performance using SaveAndPublishWithStatus()
Hello!
I'm updating and saving a page using the ContentService.SaveAndPublishWithStatus(myUmbracoContent). It works great, but it's pretty slow. Not super slow, but slow. Each call takes around 1200 - 1500 ms.
In the attached image you can see the call structure and execution times.
When I peek inside the SaveAndPublishWithStatus method I noticed it does several things, such as updating and refreshing the pagecache.
Our content tree is pretty big, and hence the xml cache file is big aswell, around 40Mb. I was thinking if this is an issue when updating and refreshing the cache, performance-wise.
Also, I was wondering if there are any overloads or tweaks for the SaveAndPublishWithStatus method I can do to optimize it? Logging configuration, cache settings (I'm new to the Umbraco cache) etc.
Any input would be much appreciated!
/jesper
Hi Jesper,
how did you measure the execution times here? What tool did you use? Thanks,
Hi Jesper,
You can turn off using of XML cache, go to /config/umbracosettings.config -
XmlCacheEnabled: Turn Xml caching of content on/off. Umbraco Makes heavy use of caching content in memory to avoid database calls. This makes umbraco faster and more efficient. You should not in any way turn this off, unless you have a very good reason to do so. It will make your website very slow.
But your site can be slower after that.
Thanks, Alex
is working on a reply...