node_load should avoid the static cache
Gerhard Killesreiter - February 4, 2009 - 13:07
| Project: | xapian |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
Description
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.
| Attachment | Size |
|---|---|
| xapian.patch | 780 bytes |

#1
Yes, this should be committed. Marking it as reviewed and to commit.
#2
Patch committed.
#3
Sorry, 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.
#4
My 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.
#5
Committed to 6.x-1.x-dev. Thanks!
#6
Also backported to 5.x-1.x-dev.
#7
Automatically closed -- issue fixed for 2 weeks with no activity.