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.

AttachmentSize
xapian.patch780 bytes

#1

Jeremy - February 4, 2009 - 16:16
Status:needs review» reviewed & tested by the community

Yes, this should be committed. Marking it as reviewed and to commit.

#2

Jeremy - February 5, 2009 - 23:11
Status:reviewed & tested by the community» fixed

Patch committed.

#3

Gerhard Killesreiter - February 6, 2009 - 12:32
Status:fixed» needs review

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.

AttachmentSize
xapian.patch 579 bytes

#4

Jeremy - February 6, 2009 - 18:22
Status:needs review» reviewed & tested by the community

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

Jeremy - February 6, 2009 - 18:27
Status:reviewed & tested by the community» fixed

Committed to 6.x-1.x-dev. Thanks!

#6

Jeremy - February 6, 2009 - 18:31

#7

System Message - February 20, 2009 - 18:40
Status:fixed» closed

Automatically closed -- issue fixed for 2 weeks with no activity.

 
 

Drupal is a registered trademark of Dries Buytaert.