Return-Path: Delivered-To: apmail-lucene-java-dev-archive@www.apache.org Received: (qmail 11592 invoked from network); 29 Nov 2007 23:25:42 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 29 Nov 2007 23:25:42 -0000 Received: (qmail 51915 invoked by uid 500); 29 Nov 2007 23:25:23 -0000 Delivered-To: apmail-lucene-java-dev-archive@lucene.apache.org Received: (qmail 51869 invoked by uid 500); 29 Nov 2007 23:25:23 -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 51858 invoked by uid 99); 29 Nov 2007 23:25:23 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 29 Nov 2007 15:25:23 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of buschmic@gmail.com designates 209.85.132.248 as permitted sender) Received: from [209.85.132.248] (HELO an-out-0708.google.com) (209.85.132.248) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 29 Nov 2007 23:25:03 +0000 Received: by an-out-0708.google.com with SMTP id c5so440508anc for ; Thu, 29 Nov 2007 15:25:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:user-agent:mime-version:to:subject:references:in-reply-to:content-type:content-transfer-encoding; bh=vAu9+PxtlTNZD7h1U2+h3GzXPq6WfZQaFJ3ct7rzaS0=; b=wpCG4SD/nJTWlYnCrJOym4SQZ4RoDbw+OjjQXRDZNxRnEWJsfypVtfv/IufhC3kkJfcuIVk7ixq5nsGEPK1eiHKMKrgeIus7mEYhKruH3LWJb9rjWUNghq4HVQohRydToE3tMs4rISHUMPH+tllUBIgzi89KFb4+YgOZ2FpXdZg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=received:message-id:date:from:user-agent:mime-version:to:subject:references:in-reply-to:content-type:content-transfer-encoding; b=oP7DTZksfvY5d+wIpabtZQxoanZ9FWpMvwXTAEQY8Lqm1EhclLnUq+AXdM5oMuFS9zNg1kqWdxX4/z3u5Ntxzc+oBlX9V9Pa+SzWBUnMdW7H1jpFnNyT9UwfXQhGGNZ9bMZFwlFn87Pqwzl8SiKLloMUXpuYAeVlojlhFHoNI4M= Received: by 10.100.253.12 with SMTP id a12mr12770169ani.1196378705456; Thu, 29 Nov 2007 15:25:05 -0800 (PST) Received: from ?192.168.1.104? ( [70.137.138.84]) by mx.google.com with ESMTPS id j7sm4988559nzd.2007.11.29.15.25.04 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 29 Nov 2007 15:25:04 -0800 (PST) Message-ID: <474F49F3.1060106@gmail.com> Date: Thu, 29 Nov 2007 15:23:31 -0800 From: Michael Busch User-Agent: Thunderbird 2.0.0.9 (Windows/20071031) MIME-Version: 1.0 To: java-dev@lucene.apache.org Subject: Re: Payload Loading and Reloading References: <474F3E80.3020905@gmail.com> <4F4F30AB-8093-4A80-B116-BFE74582817B@apache.org> In-Reply-To: <4F4F30AB-8093-4A80-B116-BFE74582817B@apache.org> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org 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