[
https://issues.apache.org/jira/browse/OAK-4797?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15542630#comment-15542630
]
Michael Dürig commented on OAK-4797:
------------------------------------
I couldn't confirm serialisation cost to be significant here. The dominating
factor is reading the stable id from the segment so caching it with the segment
might scrape some CPU cycles off. However, I doubt the overall performance gain
would justify the additional memory, so I would wait for this until we have
more evidence and bump the fix version accordingly.
Optimising stable ids for less memory usage is hard without real structs. We
are effectively limited by Java's capabilities here.
> Optimise stable ids
> --------------------
>
> Key: OAK-4797
> URL: https://issues.apache.org/jira/browse/OAK-4797
> Project: Jackrabbit Oak
> Issue Type: Improvement
> Components: segment-tar
> Reporter: Michael Dürig
> Assignee: Michael Dürig
> Labels: memory, performance
> Fix For: Segment Tar 0.0.16
>
>
> Currently {{SegmentNodeState#getStableId()}} returns a string with all its
> associated overhead:
> * high memory requirements (42 characters plus the overhead of a {{String}}
> instance. The raw requirements are a mere 20 bytes (long msb, long lsb, int
> offset). The memory overhead is problematic as the stable id is used as key
> in the node deduplication cache (See OAK-4635).
> * high serialisation cost. I have seen {{getStableId()}} occurring in stack
> traces. This is to be expected as that method is called quite often when
> comparing node states.
> This issue is to explore options for reducing both CPU and memory overhead of
> stable ids.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)