On my test upgrade of drupal.org (now possible with #211182: Updates run in unpredictable order), the current node_update_7006() is expected to take more then 30 hours. This is absolutely not acceptable. We need to improve that.
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | node_body_as_field_update-686128-6.patch | 2.1 KB | yched |
| #4 | node_body_as_field_update-686128-4.patch | 1.48 KB | yched |
| #2 | node_body_as_field_update-686128-2.patch | 1.44 KB | yched |
Comments
Comment #1
damien tournoud commentedThis will be easier to fix then anticipated:
Hm. That causes a filesort, and what,
$batch_sizeis not even used?Comment #2
yched commented$batch_size is used in
Hm, we usually use this kind of param as a range in the query...
+ changed the query so that it uses node_revision as the base table.
Comment #3
damien tournoud commentedThis looks great. Can we increase the batch size too? On my test system, I do 15 iterations per second :) This sounds like a waste of resources. We could bump that to at least 1000.
Comment #4
yched commentedWell, batch API doesn't do an ajax loop after each hook_update_N() pass, it processes as much as it can for 1 sec and then reports. So increasing $batch_size doesn't necessarily result in less ajax iterations.
50 is possibly low, but I'd rather be conservative and avoid too high values on shared setups.
Let's say 200 ?
Comment #5
damien tournoud commentedThis cannot work, we need most of the fields from 'node_revision' (notably missing here: nid and vid).
Comment #6
yched commentedRight, added nid and vid. I don't think we need anything else.
Comment #7
moshe weitzman commentedseems good afaict
Comment #8
dries commentedCommitted to CVS HEAD. Thanks.