[
https://issues.apache.org/jira/browse/OAK-413?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Jukka Zitting resolved OAK-413.
-------------------------------
Resolution: Fixed
Fix Version/s: 0.6
Fixed in revision 1404599 by making the {{MemoryNodeBuilder.child()}} method
correctly handle the case where an existing but unmodified child of a
"connected" (i.e. modified or root) parent is requested. The earlier code would
always mark such children as modified and thus cause the entire subtree to be
traversed when looking for modifications.
Before this change:
{noformat}
snapshots: 0
0 ms. ([2, 2, 2, 2, 2, 2, 2, 2, 2, 2])
snapshots: 0
68 ms. ([3282, 3282, 3282, 3282, 3282, 3282, 3282, 3282, 3282, 3282])
snapshots: 0
4744 ms. ([88572, 88572, 88572, 88572, 88572, 88572, 88572, 88572, 88572,
88572])
{noformat}
After:
{noformat}
snapshots: 0
1 ms. ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0])
snapshots: 0
0 ms. ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0])
snapshots: 0
0 ms. ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0])
{noformat}
> TreeLocation.getStatus() cost increases as more content is read below this
> location
> -----------------------------------------------------------------------------------
>
> Key: OAK-413
> URL: https://issues.apache.org/jira/browse/OAK-413
> Project: Jackrabbit Oak
> Issue Type: Bug
> Components: core
> Affects Versions: 0.5
> Reporter: Marcel Reutegger
> Assignee: Jukka Zitting
> Fix For: 0.6
>
> Attachments: OAK-413.patch
>
>
> The more content is read below a given location the more expensive the
> getStatus() becomes on that TreeLocation. There seem to be two issues:
> - Reading creates snapshots in MemoryNodeBuilder depending on how the tree is
> accessed.
> - Cost for comparing states also increases as snapshots are created for
> NodeStates.
> I'll attach a test that shows the described behaviour.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira