lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael McCandless (JIRA)" <j...@apache.org>
Subject [jira] Resolved: (LUCENE-1600) Reduce usage of String.intern(), performance is terrible
Date Mon, 13 Apr 2009 20:09:14 GMT

     [ https://issues.apache.org/jira/browse/LUCENE-1600?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Michael McCandless resolved LUCENE-1600.
----------------------------------------

       Resolution: Fixed
    Fix Version/s: 2.9

> Reduce usage of String.intern(), performance is terrible
> --------------------------------------------------------
>
>                 Key: LUCENE-1600
>                 URL: https://issues.apache.org/jira/browse/LUCENE-1600
>             Project: Lucene - Java
>          Issue Type: Improvement
>    Affects Versions: 2.4, 2.4.1
>         Environment: Windows Server 2003 x64
> Hotspot JDK 1.6.0_12 64-bit
>            Reporter: P Eger
>            Assignee: Michael McCandless
>            Priority: Minor
>             Fix For: 2.9
>
>         Attachments: intern.png, intern_perf.patch
>
>
> I profiled a simple MatchAllDocsQuery() against ~1.5 million documents (8 fields of short
text, Field.Store.YES,Field.Index.NOT_ANALYZED_NO_NORMS), then retrieved all documents via
searcher.doc(i, fs). String.intern() showed up as a top hotspot (see attached screenshot),
so i implemented a small optimization to not intern() for every new Field(), instead forcing
the intern in the FieldInfos class and adding a optional "internName" constructor to Field.
This reduced execution time for searching and iterating through all documents by 35%. Results
were similar for -server and -client.
> TRUNK (2.9) w/out patch: matched 1435563 in 8884 ms/search
> TRUNK (2.9) w/patch: matched 1435563 in 5786 ms/search

-- 
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


Mime
View raw message