jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Marcel Reutegger (JIRA)" <j...@apache.org>
Subject [jira] Updated: (JCR-1705) Reduce memory usage of transient nodes
Date Tue, 05 Aug 2008 12:38:46 GMT

     [ https://issues.apache.org/jira/browse/JCR-1705?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Marcel Reutegger updated JCR-1705:
----------------------------------

    Attachment: JCR-1705-refactored.patch

Based on Jukkas' comment I've refactored the NodeState class and pulled out the ChildNodeEntries
and ChildNodeEntry classes. Instead of handling the shared child node entries in NodeState
the ChildNodeEntries itself now know about when the internal maps are shared.

Most of the patch is simply renaming NodeState.ChildNodeEntry to ChildNodeEntry, so don't
be shocked about the size of the patch ;)

The memory saving is now a bit lower but still significant. With this patch the ChildNodeEntries
consume 14MB.

I think a similar approach is possible with the property names map.

> Reduce memory usage of transient nodes
> --------------------------------------
>
>                 Key: JCR-1705
>                 URL: https://issues.apache.org/jira/browse/JCR-1705
>             Project: Jackrabbit
>          Issue Type: Improvement
>          Components: jackrabbit-core
>            Reporter: Marcel Reutegger
>            Priority: Minor
>         Attachments: JCR-1705-refactored.patch, JCR-1705.patch
>
>
> When adding lots of transient nodes, most of them don't have child nodes because they
are leafs. The attached patch initializes NodeState.childNodeEntries with an unmodifiable
empty ChildNodeEntries instance and turns it into a modifiable one only when needed.
> Running a test with 100k nodes (10 children per node) the memory consumption for child
node entries drops from 42MB to 12MB with this patch.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message