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

ASF GitHub Bot commented on CURATOR-374:
----------------------------------------

GitHub user swallez opened a pull request:

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

    [CURATOR-374] TreeCache: reduce memory usage by using 
AtomicReferenceFieldUpdaters

    Reduce memory usage by using `AtomicFieldReferenceUpdaters` rather than 
instanciating 2 or 3 `AtomicReference` in each tree node.
    
    See [CURATOR-374](https://issues.apache.org/jira/browse/CURATOR-374)

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

    $ git pull https://github.com/swallez/curator CURATOR-374

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

    https://github.com/apache/curator/pull/184.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 #184
    
----
commit 8e733d2ecf3cfcbcbfff31afd8c00ca0a6df4a82
Author: Sylvain Wallez <[email protected]>
Date:   2017-01-04T10:47:32Z

    Replace AtomicReferences by AtomicFieldUpdaters to save allocations

----


> Reduce memory usage in TreeCache
> --------------------------------
>
>                 Key: CURATOR-374
>                 URL: https://issues.apache.org/jira/browse/CURATOR-374
>             Project: Apache Curator
>          Issue Type: Improvement
>          Components: Recipes
>    Affects Versions: 3.2.1
>            Reporter: Sylvain Wallez
>            Priority: Minor
>
> TreeCache uses 3 {{AtomicReference}} objects in its tree nodes to ensure 
> atomic updates. On large trees (we have 1M nodes) this can cause a 
> significant memory overhead.
> Using {{volatile}} fields with a {{AtomicReferenceFieldUpdater}} would avoid 
> this while keeping the atomicity garantees.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to