Return-Path: Delivered-To: apmail-lucene-java-dev-archive@www.apache.org Received: (qmail 62324 invoked from network); 30 Nov 2007 01:37:04 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 30 Nov 2007 01:37:04 -0000 Received: (qmail 55170 invoked by uid 500); 30 Nov 2007 01:36:50 -0000 Delivered-To: apmail-lucene-java-dev-archive@lucene.apache.org Received: (qmail 55132 invoked by uid 500); 30 Nov 2007 01:36:50 -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 55121 invoked by uid 99); 30 Nov 2007 01:36:50 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 29 Nov 2007 17:36:50 -0800 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 [208.97.132.145] (HELO spunkymail-a9.g.dreamhost.com) (208.97.132.145) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 30 Nov 2007 01:36:51 +0000 Received: from [192.168.0.3] (adsl-074-229-189-244.sip.rmo.bellsouth.net [74.229.189.244]) by spunkymail-a9.g.dreamhost.com (Postfix) with ESMTP id 0FD9B211CE for ; Thu, 29 Nov 2007 17:36:28 -0800 (PST) Message-Id: From: Grant Ingersoll To: java-dev@lucene.apache.org In-Reply-To: <474F49F3.1060106@gmail.com> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v915) Subject: Re: Payload Loading and Reloading Date: Thu, 29 Nov 2007 20:36:27 -0500 References: <474F3E80.3020905@gmail.com> <4F4F30AB-8093-4A80-B116-BFE74582817B@apache.org> <474F49F3.1060106@gmail.com> X-Mailer: Apple Mail (2.915) X-Virus-Checked: Checked by ClamAV on apache.org Good points, like I said, I will look more into caching in the Near Spans. I need to profile them some anyway, as I am hoping there is some speedup to be had there. -Grant On Nov 29, 2007, at 6:23 PM, Michael Busch wrote: > Grant Ingersoll wrote: > >> >> As for the cost of the seeks, why can't we just document that this is >> what is going on and discourage people from doing it? > > I'm just trying to keep SegmentTermPositions#getPayload() as efficient > as possible because it's often used in the most inner loops of > scorers. > Keeping track of the start position of the payload adds overhead to > that > method. I didn't profile it, maybe the overhead is not significant, > but > I still don't see any usecase in which caching the latest payload is > not > possible/sufficient. But maybe I'm missing one? > > >> I think caching it in SegTermPos. is the simplest > > I don't think we should do caching here. Again, SegmentTermPositions > is > used in inner loops, and often caching the last payload is not needed, > e. g. in BoostingTermQuery. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org > For additional commands, e-mail: java-dev-help@lucene.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org For additional commands, e-mail: java-dev-help@lucene.apache.org