Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Jesper 8 posts 51 karma points
    Nov 24, 2015 @ 16:34
    Jesper
    0

    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.

    savepublishperformance

    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

  • Damon 217 posts 288 karma points
    Mar 22, 2016 @ 11:11
    Damon
    0

    Hi Jesper,

    how did you measure the execution times here? What tool did you use? Thanks,

  • Alex Skrypnyk 6150 posts 24110 karma points MVP 8x admin c-trib
    Mar 22, 2016 @ 12:40
    Alex Skrypnyk
    0

    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

Please Sign in or register to post replies

Write your reply to:

Draft