[dokuwiki] increased memory footprint in recent indexer changes?

  • From: Andreas Gohr <andi@xxxxxxxxxxxxxx>
  • To: dokuwiki@xxxxxxxxxxxxx <dokuwiki@xxxxxxxxxxxxx>
  • Date: Sun, 7 Oct 2007 21:08:49 +0200

Hi List, Hi Tom!

I noticed a lot of "out of memory messages" in my server logs since I
upgraded my wiki at splitbrain.org yesterday. They seem all to occur in
the inc/indexer.php line 71 (idx_saveIndex). I was running with 32MB
(I'm now up at 64 which seems to fix it for now).

Tom as author of the recent patch, could you please have another look
at your changes with a careful eye on memory usage?

In the mentioned function I notice that you use a join('',$idx) which
AFAIK will effectively double the amount of needed memory for this
index (one array in $idx and one string returned from join). The $idx
is not passed as reference so there is a copy of it in the calling
function as well. My pageword.idx file is 2.7MB - using this function
alone will need 8MB memory already...

I won't find the time to have a deep look at this my self in the next
weeks, so I'd be glad if you could do that. The previous function tried
to avoid loading whole indexes completely with idx_updateIndexLine() -
I think you replaced the use of this function in certain places?

Andi

-- 
http://www.splitbrain.org

Other related posts: