lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shai Erera <ser...@gmail.com>
Subject Re: Optimization of memory usage in PriorityQueue
Date Mon, 22 Jun 2009 14:29:37 GMT
You mean that if we add it to Collector all developers will need to impl it?
You're right, therefore I'm not sure it's such a good idea. Also, a unlike
PQ, a Collector seems less reusable, as it doesn't declare to hold any data
structures that can/should be reused.

What about PQ?

Shai

On Mon, Jun 22, 2009 at 5:22 PM, Yonik Seeley <yonik@lucidimagination.com>wrote:

> On Mon, Jun 22, 2009 at 10:05 AM, Michael
> McCandless<lucene@mikemccandless.com> wrote:
> > On Mon, Jun 22, 2009 at 9:40 AM, Shai Erera<serera@gmail.com> wrote:
> >> Do you think it's worth it? If so, should we also add reset() to
> Collector?
> >
> > Seems like it'd be good to have the option?  But it's certainly a very
> > expert thing since it's presumably rare that one makes such a large
> > queue to make re-use worthwhile.
>
> Adding the option isn't free though - all developers must then
> implement it, and it possibly adds a runtime cost to those not
> reusing.  Attempting to reuse Collector seems super special case -
> those that want to can always develop their own custom reusable
> Collector.
>
> -Yonik
> http://www.lucidimagination.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-dev-help@lucene.apache.org
>
>

Mime
View raw message