Return-Path: Delivered-To: apmail-lucene-java-dev-archive@www.apache.org Received: (qmail 96566 invoked from network); 9 Apr 2007 18:33:56 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 9 Apr 2007 18:33:56 -0000 Received: (qmail 53717 invoked by uid 500); 9 Apr 2007 18:33:59 -0000 Delivered-To: apmail-lucene-java-dev-archive@lucene.apache.org Received: (qmail 53670 invoked by uid 500); 9 Apr 2007 18:33:59 -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 53659 invoked by uid 99); 9 Apr 2007 18:33:59 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 09 Apr 2007 11:33:59 -0700 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 09 Apr 2007 11:33:52 -0700 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 7AE95714077 for ; Mon, 9 Apr 2007 11:33:32 -0700 (PDT) Message-ID: <16139848.1176143612479.JavaMail.jira@brutus> Date: Mon, 9 Apr 2007 11:33:32 -0700 (PDT) From: "Yonik Seeley (JIRA)" To: java-dev@lucene.apache.org Subject: [jira] Commented: (LUCENE-584) Decouple Filter from BitSet In-Reply-To: <27200586.1149076109798.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/LUCENE-584?page=3Dcom.atlassian= .jira.plugin.system.issuetabpanels:comment-tabpanel#action_12487594 ]=20 Yonik Seeley commented on LUCENE-584: ------------------------------------- > When you rerun, you may want to use my alg - to compare the two approache= s in one run. This is more dangerous though. GC from one method's garbage can penalize t= he 2nd methods performance. Also, hotspot effects are hard to account for (if method1 and method2 use c= ommon methods, method2 will often execute faster than method one because mo= re optimization has been done on those common methods). The hotspot effect can be minimized by running the test multiple times in t= he same JVM instance and discarding the first runs, but it's not so easy fo= r GC. > Decouple Filter from BitSet > --------------------------- > > Key: LUCENE-584 > URL: https://issues.apache.org/jira/browse/LUCENE-584 > Project: Lucene - Java > Issue Type: Improvement > Components: Search > Affects Versions: 2.0.1 > Reporter: Peter Sch=C3=A4fer > Priority: Minor > Attachments: bench-diff.txt, bench-diff.txt, BitsMatcher.java, Fi= lter-20060628.patch, HitCollector-20060628.patch, IndexSearcher-20060628.pa= tch, MatchCollector.java, Matcher.java, Matcher20070226.patch, Scorer-20060= 628.patch, Searchable-20060628.patch, Searcher-20060628.patch, Some Matcher= s.zip, SortedVIntList.java, TestSortedVIntList.java > > > {code} > package org.apache.lucene.search; > public abstract class Filter implements java.io.Serializable=20 > { > public abstract AbstractBitSet bits(IndexReader reader) throws IOExcept= ion; > } > public interface AbstractBitSet=20 > { > public boolean get(int index); > } > {code} > It would be useful if the method =3DFilter.bits()=3D returned an abstract= interface, instead of =3Djava.util.BitSet=3D. > Use case: there is a very large index, and, depending on the user's privi= leges, only a small portion of the index is actually visible. > Sparsely populated =3Djava.util.BitSet=3Ds are not efficient and waste lo= ts of memory. It would be desirable to have an alternative BitSet implement= ation with smaller memory footprint. > Though it _is_ possibly to derive classes from =3Djava.util.BitSet=3D, it= was obviously not designed for that purpose. > That's why I propose to use an interface instead. The default implementat= ion could still delegate to =3Djava.util.BitSet=3D. --=20 This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. --------------------------------------------------------------------- To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org For additional commands, e-mail: java-dev-help@lucene.apache.org