Return-Path: Delivered-To: apmail-lucene-java-dev-archive@www.apache.org Received: (qmail 76939 invoked from network); 22 Jun 2009 09:29:46 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 22 Jun 2009 09:29:46 -0000 Received: (qmail 84289 invoked by uid 500); 22 Jun 2009 09:29:56 -0000 Delivered-To: apmail-lucene-java-dev-archive@lucene.apache.org Received: (qmail 84212 invoked by uid 500); 22 Jun 2009 09:29:56 -0000 Mailing-List: contact java-dev-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: java-dev@lucene.apache.org Delivered-To: mailing list java-dev@lucene.apache.org Received: (qmail 84204 invoked by uid 99); 22 Jun 2009 09:29:56 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 22 Jun 2009 09:29:56 +0000 X-ASF-Spam-Status: No, hits=1.2 required=10.0 tests=SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [209.85.210.172] (HELO mail-yx0-f172.google.com) (209.85.210.172) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 22 Jun 2009 09:29:47 +0000 Received: by yxe2 with SMTP id 2so141391yxe.29 for ; Mon, 22 Jun 2009 02:29:25 -0700 (PDT) MIME-Version: 1.0 Received: by 10.151.135.2 with SMTP id m2mr10952940ybn.55.1245662965269; Mon, 22 Jun 2009 02:29:25 -0700 (PDT) In-Reply-To: <786fde50906220025u6756b56cnf56a4b48b403e345@mail.gmail.com> References: <786fde50906220025u6756b56cnf56a4b48b403e345@mail.gmail.com> Date: Mon, 22 Jun 2009 05:29:25 -0400 Message-ID: <9ac0c6aa0906220229t1f9b0d26n53c154f719cc727d@mail.gmail.com> Subject: Re: Optimization of memory usage in PriorityQueue From: Michael McCandless To: java-dev@lucene.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org On Mon, Jun 22, 2009 at 3:25 AM, Shai Erera wrote: > Or ... we can do nothing, and say that one can write his own Collector, and > use Sun's PQ (or any other), if one has a case like "I need 10K results, but > I don't know how many are there, and specifically I want to optimize for the > case of 1 result". +1 I think Lucene's current PQ is optimized for the [very] common case, and if someone would like to eg swap to Sun's PQ impl, the custom Collector API is the best route. (And, I'd love to hear back on how the performance compares! If Sun has a faster PQ than Lucene, we should fix that ;) ). Though, are Lucene's core collectors reusable? If you did really want say 100K results out of each search (very unusual), it'd be nice to not have to throw away the Collector/PQ each time. Mike --------------------------------------------------------------------- To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org For additional commands, e-mail: java-dev-help@lucene.apache.org