ZF-6283: Zend_Search_Lucene indexing memory usage improvement.
The issue was originaly reported by Jurriën Stutterheim:
Zend_Search_Lucene memory leak?
I ran into a problem indexing a relatively small amount of records (+/- 50k). Memory usage slowly rises from roughly 45MB to the memory limit of 128M (using the default merge factor of 10). When the indexing process hits the limit, I've only indexed roughly 15k documents. When using a merge factor of 5 I manage to squeeze in a few thousand extra records before running out of memory again. Executing the same code, but uncommenting the $index->addDocument() call, I happily iterate over the 50k records, using only 47MB of memory.
Strangely enough I've never experienced this in a previous application, where I'd index 150k records (roughly the same size as the current ones) without a problem. Could there be a memory leak of some sorts? Or is this expected? I'm using Zend Server 4.0.1 on Mac OS X 10.5.6 with mbstring enabled