lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mikhail Khludnev (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (SOLR-12878) FacetFieldProcessorByHashDV is reconstructing FieldInfos on every instantiation
Date Thu, 01 Nov 2018 06:41:00 GMT

    [ https://issues.apache.org/jira/browse/SOLR-12878?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16671164#comment-16671164
] 

Mikhail Khludnev commented on SOLR-12878:
-----------------------------------------

[~tpunder], considering [~dsmiley]'s input, could you please cache fieldinfos at {{SlowCompositeReaderWrapper}}
and add somewhere in test assert that {{getFieldInfos()}} returns the same instance everytime.
Please keep {{advanceExact()}} aside for a while. I appreciate your contribution. 

> FacetFieldProcessorByHashDV is reconstructing FieldInfos on every instantiation
> -------------------------------------------------------------------------------
>
>                 Key: SOLR-12878
>                 URL: https://issues.apache.org/jira/browse/SOLR-12878
>             Project: Solr
>          Issue Type: Bug
>      Security Level: Public(Default Security Level. Issues are Public) 
>          Components: Facet Module
>    Affects Versions: 7.5
>            Reporter: Tim Underwood
>            Assignee: Mikhail Khludnev
>            Priority: Major
>              Labels: performance
>             Fix For: 7.6, master (8.0)
>
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> The FacetFieldProcessorByHashDV constructor is currently calling:
> {noformat}
> FieldInfo fieldInfo = fcontext.searcher.getSlowAtomicReader().getFieldInfos().fieldInfo(sf.getName());
> {noformat}
> Which is reconstructing FieldInfos each time.  Simply switching it to:
> {noformat}
> FieldInfo fieldInfo = fcontext.searcher.getFieldInfos().fieldInfo(sf.getName());
> {noformat}
>  
> causes it to use the cached version of FieldInfos in the SolrIndexSearcher.
> On my index the FacetFieldProcessorByHashDV is 2-3 times slower than the legacy facets
without this fix.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Mime
View raw message