You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@curator.apache.org by leons727 <gi...@git.apache.org> on 2014/10/03 23:15:37 UTC

[GitHub] curator pull request: Performance fix in processChildren()

GitHub user leons727 opened a pull request:

    https://github.com/apache/curator/pull/46

    Performance fix in processChildren()

    Current implementation may lead to a large number of calls to java.util.ArrayList.contains() with a large list, when syncing a large number of path children, as evident from this stack trace:
    
    ```
    "main-EventThread" daemon prio=10 tid=0x00007fd089593800 nid=0x6fbf runnable [0x00007fd0eb3a1000]
    		   java.lang.Thread.State: RUNNABLE
    		        at java.util.ArrayList.indexOf(ArrayList.java:298)
    		        at java.util.ArrayList.contains(ArrayList.java:281)
    		        at java.util.AbstractSet.removeAll(AbstractSet.java:176)
    		        at org.apache.curator.framework.recipes.cache.PathChildrenCache.processChildren(PathChildrenCache.java:655)
    		        at org.apache.curator.framework.recipes.cache.PathChildrenCache.access$200(PathChildrenCache.java:68)
    		        at org.apache.curator.framework.recipes.cache.PathChildrenCache$4.processResult(PathChildrenCache.java:490)
    		        at org.apache.curator.framework.imps.CuratorFrameworkImpl.sendToBackgroundCallback(CuratorFrameworkImpl.java:715)
    		        at org.apache.curator.framework.imps.CuratorFrameworkImpl.processBackgroundOperation(CuratorFrameworkImpl.java:502)
    		        at org.apache.curator.framework.imps.GetChildrenBuilderImpl$2.processResult(GetChildrenBuilderImpl.java:166)
    		        at org.apache.zookeeper.ClientCnxn$EventThread.processEvent(ClientCnxn.java:587)
    		        at org.apache.zookeeper.ClientCnxn$EventThread.run(ClientCnxn.java:495)
    ```

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

    $ git pull https://github.com/leons727/curator master

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

    https://github.com/apache/curator/pull/46.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 #46
    
----
commit bea6b80ec2622251156143b45c49a7f7871082cd
Author: Leon Stein <ls...@ebay.com>
Date:   2014-10-03T21:09:27Z

    Performance fix in processChildren()

----


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

[GitHub] curator pull request: Performance fix in processChildren()

Posted by cammckenzie <gi...@git.apache.org>.
Github user cammckenzie commented on the pull request:

    https://github.com/apache/curator/pull/46#issuecomment-61016535
  
    Is there a JIRA for this PR?


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

[GitHub] curator pull request: Performance fix in processChildren()

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

    https://github.com/apache/curator/pull/46


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

[GitHub] curator pull request: Performance fix in processChildren()

Posted by dragonsinth <gi...@git.apache.org>.
Github user dragonsinth commented on the pull request:

    https://github.com/apache/curator/pull/46#issuecomment-57886128
  
    Looks good to me


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

[GitHub] curator pull request: Performance fix in processChildren()

Posted by cammckenzie <gi...@git.apache.org>.
Github user cammckenzie commented on the pull request:

    https://github.com/apache/curator/pull/46#issuecomment-60877495
  
    Looks good to me also


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