I have a site with 1494 nodes. If I try to publish all pages and sub pages it takes a very long time (10 minutes plus). I have increased the execution timeout so that I can publish 400 pages in under 10 minutes. Is there anything I can do to improve the speed of publishing?
In my experience, yes it is. On a normal day it takes Umbraco around 0,5s to publish a page. This, of course, varies depending on your setup, but the timings you are describing seems about right. I can only agree with you that the time it takes to publish a node is a bit high.
Yes, those figures seems quite right. Umbraco is optimized for single page publishing and instant caching, not bulk operations which is the primary reason it take some time. On each publish Umbraco will generate a new version of the page, generate an optimized version for caching and inject that version into a general cache storage in the correct position in the hierarchy.
That takes a bit of time. In return, that's why Umbraco is very fast in rendering pages once they're published.
There are a few different scenarios that comes to mind.
Mostly, when I'm dealing with bulk-publishing it's in the development phase, where I want to generate a certain amount of test data or do different kinds of imports. In those cases, both creating and publishing lots of documents can take a considerable amount of time. When I'm about to import 500 documents I wanna make sure I only have to do it once, otherwise, I just wasted 20 minutes :)
Another scenario I can think of, is that of an editor who lost track of the pages that needs publishing and therefor just do a full publish on the root node eg. Depending on the size of the site, it could be a time-consuming choice. Or perhaps a team of editors worked up a lot of pages not yet ready for publishing. When they finally do hit the publish button, they might have to wait a while. It's not the most common scenarios, but valid ones none the less I think.
Sometimes we add a property to a base documenttype which means it's added to all nodes on the site. If I try to use that property in xslt or razor it will give an error on pages that haven't been republished because the property doesn't exist there yet (it's not added as an xml element in the umbraco.config yet). After republishing everything the property does exist :-).
I have a website which needs to do a republish of a lot of pages at once. It is a website which contains travel discounts. Those travel discounts are nightly imported from third-partie suppliers. At this moment it contains about 3000 travel discounts and this is only from 20% of the suppliers. After this nightly import, I need to republish the complete travel discounts tree because off the lack of a lot of the suppliers which are not able to deliver only the daily updates.
according my previous post and out of curiousity: what is quicker, doing a batch publish-all through the API after importing all new pages or doing a single page publish during import?
@Martijn: There shouldn't be a difference as doing a publish all just iterates over child nodes and do a single publish on each. Umbraco hasn't been designed / optimized for the scenario above.
Keep in mind that publishing through the API or using bulk publish in the menu ("publish this page and all it's sub-pages by checking publish all children below") doesn't check mandatory fields. If you have an empty content picker which is mandatory it still get's published and could cause errors in your XSLT or Razor if they expect it to be selected (because there is no check if it's empty).
Publishing in progress speed
Hi
I have a site with 1494 nodes. If I try to publish all pages and sub pages it takes a very long time (10 minutes plus). I have increased the execution timeout so that I can publish 400 pages in under 10 minutes. Is there anything I can do to improve the speed of publishing?
Thanks
Is this speed of publishing normal?
In my experience, yes it is. On a normal day it takes Umbraco around 0,5s to publish a page. This, of course, varies depending on your setup, but the timings you are describing seems about right. I can only agree with you that the time it takes to publish a node is a bit high.
Yes, those figures seems quite right. Umbraco is optimized for single page publishing and instant caching, not bulk operations which is the primary reason it take some time. On each publish Umbraco will generate a new version of the page, generate an optimized version for caching and inject that version into a general cache storage in the correct position in the hierarchy.
That takes a bit of time. In return, that's why Umbraco is very fast in rendering pages once they're published.
Out of curiosity why would you need to publish all the pages on the site (I'm just collecting feedback on Umbraco usage)?
There are a few different scenarios that comes to mind.
Mostly, when I'm dealing with bulk-publishing it's in the development phase, where I want to generate a certain amount of test data or do different kinds of imports.
In those cases, both creating and publishing lots of documents can take a considerable amount of time. When I'm about to import 500 documents I wanna make sure I only have to do it once, otherwise, I just wasted 20 minutes :)
Another scenario I can think of, is that of an editor who lost track of the pages that needs publishing and therefor just do a full publish on the root node eg. Depending on the size of the site, it could be a time-consuming choice. Or perhaps a team of editors worked up a lot of pages not yet ready for publishing. When they finally do hit the publish button, they might have to wait a while. It's not the most common scenarios, but valid ones none the less I think.
Hi Niels,
Sometimes we add a property to a base documenttype which means it's added to all nodes on the site. If I try to use that property in xslt or razor it will give an error on pages that haven't been republished because the property doesn't exist there yet (it's not added as an xml element in the umbraco.config yet). After republishing everything the property does exist :-).
Jeroen
Hi Niels,
I have a website which needs to do a republish of a lot of pages at once. It is a website which contains travel discounts. Those travel discounts are nightly imported from third-partie suppliers. At this moment it contains about 3000 travel discounts and this is only from 20% of the suppliers.
After this nightly import, I need to republish the complete travel discounts tree because off the lack of a lot of the suppliers which are not able to deliver only the daily updates.
Best regards,
Martijn
Hi Niels,
according my previous post and out of curiousity: what is quicker, doing a batch publish-all through the API after importing all new pages or doing a single page publish during import?
@Martijn: There shouldn't be a difference as doing a publish all just iterates over child nodes and do a single publish on each. Umbraco hasn't been designed / optimized for the scenario above.
Keep in mind that publishing through the API or using bulk publish in the menu ("publish this page and all it's sub-pages by checking publish all children below") doesn't check mandatory fields. If you have an empty content picker which is mandatory it still get's published and could cause errors in your XSLT or Razor if they expect it to be selected (because there is no check if it's empty).
Think this is fixed in v5: http://our.umbraco.org/forum/core/umbraco-5-general-discussion/25082-Alpha-2-Publish-node-and-all-its-subpages
Jeroen
is working on a reply...