When indexing, the cron function does a node_load($nid). This will cause the node to be statically cached and can cause the memory limit to be reached. Since the node will not be needed later again, I propose to not statically cache it by doing node_load(array('nid' => $nid))
See attached patch.
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | xapian.patch | 579 bytes | gerhard killesreiter |
| xapian.patch | 780 bytes | gerhard killesreiter |
Comments
Comment #1
jeremy commentedYes, this should be committed. Marking it as reviewed and to commit.
Comment #2
jeremy commentedPatch committed.
Comment #3
gerhard killesreiter commentedSorry, this patch was of course bogus. While it does not get the next node from the cache, it will not suppress the use of the cache at all. With this new patch I can index 10000 nodes on a setup where I was only able to index 200 previously.
Comment #4
jeremy commentedMy bad for not catching that. Indeed, the loaded node will be cached statically if there is no revision specified. So yes, the reset is the correct thing to do.
Comment #5
jeremy commentedCommitted to 6.x-1.x-dev. Thanks!
Comment #6
jeremy commentedAlso backported to 5.x-1.x-dev.