You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by rustamhsmv <gi...@git.apache.org> on 2016/12/17 21:56:25 UTC

[GitHub] lucene-solr pull request #126: SOLR-9876 Reuse CountSlotArrAcc internal arra...

GitHub user rustamhsmv opened a pull request:

    https://github.com/apache/lucene-solr/pull/126

    SOLR-9876 Reuse CountSlotArrAcc internal array for same level subFacets

    All facet processors are processed sequentially. We can reuse CountSlotArrAcc internal array across same level facet processors instead of reallocating new array for each.


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/rustamhsmv/lucene-solr FacetReusable

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/lucene-solr/pull/126.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #126
    
----
commit a3812a67d95651c70c801cbea5ed1ff2e39ee051
Author: rustamhsmv <ru...@outlook.com>
Date:   2016-12-16T23:34:47Z

    make CountSlotArrAcc internal array reusable

commit 1c069cc6e0fdc084bb1b88591dae32143d4ebdba
Author: rustamhsmv <ru...@outlook.com>
Date:   2016-12-17T21:51:21Z

    Comments

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] lucene-solr pull request: SOLR-7011: fix OverseerCollectionProcess...

Posted by cpoerschke <gi...@git.apache.org>.
Github user cpoerschke closed the pull request at:

    https://github.com/apache/lucene-solr/pull/126


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] lucene-solr pull request #126: SOLR-9876 Reuse CountSlotArrAcc internal arra...

Posted by dennisgove <gi...@git.apache.org>.
Github user dennisgove commented on a diff in the pull request:

    https://github.com/apache/lucene-solr/pull/126#discussion_r103494004
  
    --- Diff: solr/core/src/java/org/apache/solr/search/facet/SlotAcc.java ---
    @@ -394,7 +394,16 @@ public CountSlotAcc(FacetContext fcontext) {
       int[] result;
       public CountSlotArrAcc(FacetContext fcontext, int numSlots) {
         super(fcontext);
    -    result = new int[numSlots];
    +    
    +    String key = fcontext.level + this.getClass().getSimpleName();
    +    result = (int[]) fcontext.getReusable(key);
    +    if (result == null || result.length < numSlots) {
    +      result = new int[numSlots];
    +      fcontext.addReusable(key, result);
    --- End diff --
    
    If null != result is it reasonable to reset the value under the key to the newly created array?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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