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

Tim Underwood commented on SOLR-12878:
--------------------------------------

Pull Request:  https://github.com/apache/lucene-solr/pull/473

Note: I also updated the remaining collect method that was not using 
advanceExact to use it.  This is a separate commit in the PR and can be split 
out into a separate issue if needed.

> 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
>            Priority: Major
>              Labels: performance
>          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-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org

Reply via email to