Return-Path: X-Original-To: apmail-lucene-java-user-archive@www.apache.org Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id E2A2F11B0E for ; Tue, 3 Jun 2014 10:20:17 +0000 (UTC) Received: (qmail 43830 invoked by uid 500); 3 Jun 2014 10:20:16 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 43761 invoked by uid 500); 3 Jun 2014 10:20:16 -0000 Mailing-List: contact java-user-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: java-user@lucene.apache.org Delivered-To: mailing list java-user@lucene.apache.org Received: (qmail 43751 invoked by uid 99); 3 Jun 2014 10:20:16 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 03 Jun 2014 10:20:16 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of jamie@mailarchiva.com designates 82.145.44.153 as permitted sender) Received: from [82.145.44.153] (HELO glonass.stimulussoft.com) (82.145.44.153) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 03 Jun 2014 10:20:11 +0000 Received: by glonass.stimulussoft.com (Postfix, from userid 5001) id 98CDA8005A5; Tue, 3 Jun 2014 11:17:40 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on glonass X-Spam-Level: Received: from jamiemacbook.local (unknown [197.96.55.228]) (using TLSv1 with cipher ECDHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by glonass.stimulussoft.com (Postfix) with ESMTPSA id 7792B800345 for ; Tue, 3 Jun 2014 11:17:32 +0100 (BST) Message-ID: <538DA1A3.4040302@mailarchiva.com> Date: Tue, 03 Jun 2014 12:21:23 +0200 From: Jamie User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:24.0) Gecko/20100101 Thunderbird/24.5.0 MIME-Version: 1.0 To: java-user@lucene.apache.org Subject: Re: search performance References: <01AFE0FB733B9944974A82A09CEB7A0309C81ABB21@mail3.imedx.com> <01AFE0FB733B9944974A82A09CEB7A0309C835D16A@mail3.imedx.com> <1400581087.2420.182.camel@te-prime> <01AFE0FB733B9944974A82A09CEB7A0309C835D36D@mail3.imedx.com> <1401153243448-4138215.post@n3.nabble.com> <003301cf7974$7a200600$6e601200$@gmx.de> <01AFE0FB733B9944974A82A09CEB7A0309C881E6CF@mail3.imedx.com> <538C1F0F.3010300@mailarchiva.com> <538C5174.7040101@mailarchiva.com> <538D962E.2020809@mailarchiva.com> <538D99A4.1060605@mailarchiva.com> <538D9BAC.7030501@mailarchiva.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Old-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00 autolearn=ham version=3.3.2 Vitaly See below: On 2014/06/03, 12:09 PM, Vitaly Funstein wrote: > A couple of questions. > > 1. What are you trying to achieve by setting the current thread's priority > to max possible value? Is it grabbing as much CPU time as possible? In my > experience, mucking with thread priorities like this is at best futile, and > at worst quite detrimental to responsiveness and overall performance of the > system as a whole. I would remove that line. Yes, you are right to be worried about this, especially since thread priorities behave differently on different platforms. > > 2. This seems suspicious: > > if (getPagination()) { > max = start + length; > } else { > max = getMaxResults(); > } > > If start is at 100M, and length is 1000 - what do you think Lucene will try > and do when you pass this max to the collector? I dont see the problem here. The collector will start from zero to max results. I agree that from a performance perspective, ts not ideal to return all results from the beginning of the search, but the Lucene API us with no choice. I simply do not know the ScoreDoc to start from. If I did keep a record of it, then I would need to store all scoredocs for the entire result set. When there are 60M+ results, this can be problematic in terms of memory consumption. It would be far nicer if there was a searchAfter function that took a position as an integer. Regards Jamie > > --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org For additional commands, e-mail: java-user-help@lucene.apache.org