Copied to clipboard

Flag this post as spam?

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


  • Matthew 14 posts 84 karma points
    Aug 09, 2018 @ 22:17
    Matthew
    0

    Saving and indexing programmatically - umbraco 7.6.5

    Hi, I am working on an Umbraco site (7.6.5). I am having some trouble saving and publishing a content item (to DB and index).

    When calling this ....

    ApplicationContext.Current.Services.ContentService.SaveAndPublish(contentItem);
    

    The operation is painfully slow. The item is saved, but intermittently times out, or on average takes upto 20-30 seconds. A little faster on my local (15-20 seconds) than the web server. Any tricks / tips to speed that up?

    Secondly, I need my item to be saved but also indexed (examine). This also seems to work but i always have to run the above line twice to get the item into the index!? In terms of speed that isn’t an option.

    Any ideas. I might be missing something. Perhaps a cleaner faster way to do this progammatically?

    Cheers Matt

Please Sign in or register to post replies

Write your reply to:

Draft