You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Andrzej Bialecki (JIRA)" <ji...@apache.org> on 2018/08/30 13:28:00 UTC

[jira] [Created] (SOLR-12723) Reduce object creation in HashBasedRouter

Andrzej Bialecki  created SOLR-12723:
----------------------------------------

             Summary: Reduce object creation in HashBasedRouter
                 Key: SOLR-12723
                 URL: https://issues.apache.org/jira/browse/SOLR-12723
             Project: Solr
          Issue Type: Improvement
      Security Level: Public (Default Security Level. Issues are Public)
            Reporter: Andrzej Bialecki 
            Assignee: Andrzej Bialecki 
             Fix For: 7.5


When the default {{CompositeIdRouter}} is used it calls for every update {{HashBasedRouter.hashToSlice}} method, which obtains a collection of active slices from the current {{DocCollection}} and then iterates over it checking what range contains the document's id hash.

Each time this creates a new iterator, which is wasteful - a much lightweight approach would be to construct a {{Slice[]}} when {{DocCollection}} is constructed and use indexed access to this array.

This change has especially visible impact on simulator performance for large scale tests, where other costs are not present.



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