I am finding that contentservice saveandpublish is very slow. Takes around 10+ seconds to complete saving a single content item. Any suggestions on speeding this up ?
Can you post your code where you're calling it? I'm wondering what values you're saving to the content, could potentially be something that's slowing it down?
Also, I believe SaveAndPublish is obsolete - have a look at swapping this out for SaveAndPublishWithStatus.
Do you have any slow down when publishing content as normal?
Thanks for coming back on this. Well, I have actually tried SaveAndPublish as well as SaveAndPublishWithStatus. Sticking with the later. Both seem particularly slow. When publishing from the CMS as normal it doesnt feel overly quick but responds much quicker than through code.
I call method like this ... using umbraco.core ApplicationContext
Nothing special about the call. The contentItem contains around 30 properties, just a mix of strings and ints. When I call on my local the operation usually takes around 6-7 seconds. Perhaps this is expected ? .... web server seems slower.
If I call this (with no publish) it takes around 5 seconds to complete.
Any suggestions, ideas, hints what might be slowling the process down ? .... ideally it would be lightning fast.
The item eventually saves and published. However, I also find that the item isn't query able through the index (examine) when looking for it under the root unless I run the SaveAndPublishWithStatus twice. I actually wouldnt mind calling the method twice (not ideal), if it would running through quickly.
Are there alternate ways to do the above. End of the day I just want to efficiently save and publish a content item programmatically (and see it in the index).
Contentservice api saveandpublish slow ...
Hi,
I am finding that contentservice saveandpublish is very slow. Takes around 10+ seconds to complete saving a single content item. Any suggestions on speeding this up ?
Umbraco 7.6.5
Thanks Matt
Hi Matt,
Can you post your code where you're calling it? I'm wondering what values you're saving to the content, could potentially be something that's slowing it down?
Also, I believe
SaveAndPublish
is obsolete - have a look at swapping this out forSaveAndPublishWithStatus
.Do you have any slow down when publishing content as normal?
Thanks,
Ben
Hi Ben,
Thanks for coming back on this. Well, I have actually tried
SaveAndPublish
as well asSaveAndPublishWithStatus
. Sticking with the later. Both seem particularly slow. When publishing from the CMS as normal it doesnt feel overly quick but responds much quicker than through code.I call method like this ... using umbraco.core
ApplicationContext
Nothing special about the call. The contentItem contains around 30 properties, just a mix of strings and ints. When I call on my local the operation usually takes around 6-7 seconds. Perhaps this is expected ? .... web server seems slower.
If I call this (with no publish) it takes around 5 seconds to complete.
Any suggestions, ideas, hints what might be slowling the process down ? .... ideally it would be lightning fast.
The item eventually saves and published. However, I also find that the item isn't query able through the index (examine) when looking for it under the root unless I run the SaveAndPublishWithStatus twice. I actually wouldnt mind calling the method twice (not ideal), if it would running through quickly.
Are there alternate ways to do the above. End of the day I just want to efficiently save and publish a content item programmatically (and see it in the index).
Any thoughts ? .....
is working on a reply...