lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Claudio ." <>
Subject Optimization of memory usage in PriorityQueue
Date Sun, 21 Jun 2009 23:39:19 GMT


The PriorityQueue used in TopDocCollector does not optimize the memory usage. If I do this

TopDocs topDocs =, null, 10000);    
And only 1 document is returned. The PriorityQueue will create an Object[] of size 10000 +
1, but only one position of the array is used.
The Lucene could implement a PriorityQueue with size extensible.

The PriorityQueue of the Sun is size extensible. Why does not use it?

Drag n’ drop—Get easy photo sharing with Windows Live™ Photos.
View raw message