You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by "Marcel Reutegger (JIRA)" <ji...@apache.org> on 2008/08/08 16:25:44 UTC
[jira] Created: (JCR-1715) Prevent excessive Path.Element instances
Prevent excessive Path.Element instances
----------------------------------------
Key: JCR-1715
URL: https://issues.apache.org/jira/browse/JCR-1715
Project: Jackrabbit
Issue Type: Improvement
Components: jackrabbit-core, jackrabbit-spi-commons
Reporter: Marcel Reutegger
Priority: Minor
Even when a CachingHierarchyManager is used jackrabbit creates a lot of Path.Element instances. The internally used PathMap (spi-commons) creates new Path.Element instances whenever a path is constructed, even when the path is constructed from cached PathMap.Elements.
Running a test with 10k nodes results in 250k Path.Element instances being created and held in memory (mostly for events).
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (JCR-1715) Prevent excessive Path.Element instances
Posted by "Jukka Zitting (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/JCR-1715?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jukka Zitting updated JCR-1715:
-------------------------------
Remaining Estimate: 0h
Original Estimate: 0h
+1 Looks good.
> Prevent excessive Path.Element instances
> ----------------------------------------
>
> Key: JCR-1715
> URL: https://issues.apache.org/jira/browse/JCR-1715
> Project: Jackrabbit
> Issue Type: Improvement
> Components: jackrabbit-core, jackrabbit-spi-commons
> Reporter: Marcel Reutegger
> Priority: Minor
> Attachments: JCR-1715-part1.patch, JCR-1715-part2.patch
>
> Original Estimate: 0h
> Remaining Estimate: 0h
>
> Even when a CachingHierarchyManager is used jackrabbit creates a lot of Path.Element instances. The internally used PathMap (spi-commons) creates new Path.Element instances whenever a path is constructed, even when the path is constructed from cached PathMap.Elements.
> Running a test with 10k nodes results in 250k Path.Element instances being created and held in memory (mostly for events).
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (JCR-1715) Prevent excessive Path.Element instances
Posted by "Marcel Reutegger (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/JCR-1715?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Marcel Reutegger updated JCR-1715:
----------------------------------
Attachment: JCR-1715-part2.patch
Patch part2 introduces a HashCache for Path.Element instances in PathFactoryImpl. This reduces the number of Path.Element instances held in memory during the test to 11k.
> Prevent excessive Path.Element instances
> ----------------------------------------
>
> Key: JCR-1715
> URL: https://issues.apache.org/jira/browse/JCR-1715
> Project: Jackrabbit
> Issue Type: Improvement
> Components: jackrabbit-core, jackrabbit-spi-commons
> Reporter: Marcel Reutegger
> Priority: Minor
> Attachments: JCR-1715-part1.patch, JCR-1715-part2.patch
>
>
> Even when a CachingHierarchyManager is used jackrabbit creates a lot of Path.Element instances. The internally used PathMap (spi-commons) creates new Path.Element instances whenever a path is constructed, even when the path is constructed from cached PathMap.Elements.
> Running a test with 10k nodes results in 250k Path.Element instances being created and held in memory (mostly for events).
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (JCR-1715) Prevent excessive Path.Element
instances
Posted by "Marcel Reutegger (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/JCR-1715?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Marcel Reutegger resolved JCR-1715.
-----------------------------------
Resolution: Fixed
Fix Version/s: 1.5
Applied both patches in revisions 691606 and 691607.
> Prevent excessive Path.Element instances
> ----------------------------------------
>
> Key: JCR-1715
> URL: https://issues.apache.org/jira/browse/JCR-1715
> Project: Jackrabbit
> Issue Type: Improvement
> Components: jackrabbit-core, jackrabbit-spi-commons
> Reporter: Marcel Reutegger
> Priority: Minor
> Fix For: 1.5
>
> Attachments: JCR-1715-part1.patch, JCR-1715-part2.patch
>
> Original Estimate: 0h
> Remaining Estimate: 0h
>
> Even when a CachingHierarchyManager is used jackrabbit creates a lot of Path.Element instances. The internally used PathMap (spi-commons) creates new Path.Element instances whenever a path is constructed, even when the path is constructed from cached PathMap.Elements.
> Running a test with 10k nodes results in 250k Path.Element instances being created and held in memory (mostly for events).
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (JCR-1715) Prevent excessive Path.Element
instances
Posted by "Marcel Reutegger (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/JCR-1715?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12620945#action_12620945 ]
Marcel Reutegger commented on JCR-1715:
---------------------------------------
A note on the Path.Element cache in PathFactoryImpl. Because equals and hashCode on Path.Element is defined to use the normalized index I had to limit the cacheable path elements to the ones with an undefined index.
> Prevent excessive Path.Element instances
> ----------------------------------------
>
> Key: JCR-1715
> URL: https://issues.apache.org/jira/browse/JCR-1715
> Project: Jackrabbit
> Issue Type: Improvement
> Components: jackrabbit-core, jackrabbit-spi-commons
> Reporter: Marcel Reutegger
> Priority: Minor
> Attachments: JCR-1715-part1.patch, JCR-1715-part2.patch
>
>
> Even when a CachingHierarchyManager is used jackrabbit creates a lot of Path.Element instances. The internally used PathMap (spi-commons) creates new Path.Element instances whenever a path is constructed, even when the path is constructed from cached PathMap.Elements.
> Running a test with 10k nodes results in 250k Path.Element instances being created and held in memory (mostly for events).
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (JCR-1715) Prevent excessive Path.Element instances
Posted by "Marcel Reutegger (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/JCR-1715?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Marcel Reutegger updated JCR-1715:
----------------------------------
Attachment: JCR-1715-part1.patch
This patch replaces the name variable in PathMap.Element with a Path.Element that is suitable for path construction. With this patch the number of Path.Element instances in memory for the above mentioned test is reduced to 60k.
> Prevent excessive Path.Element instances
> ----------------------------------------
>
> Key: JCR-1715
> URL: https://issues.apache.org/jira/browse/JCR-1715
> Project: Jackrabbit
> Issue Type: Improvement
> Components: jackrabbit-core, jackrabbit-spi-commons
> Reporter: Marcel Reutegger
> Priority: Minor
> Attachments: JCR-1715-part1.patch
>
>
> Even when a CachingHierarchyManager is used jackrabbit creates a lot of Path.Element instances. The internally used PathMap (spi-commons) creates new Path.Element instances whenever a path is constructed, even when the path is constructed from cached PathMap.Elements.
> Running a test with 10k nodes results in 250k Path.Element instances being created and held in memory (mostly for events).
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.