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

Nuno Santos resolved OAK-12451.
-------------------------------
    Fix Version/s: 2.8.0
       Resolution: Fixed

> Add single-level fast path to ListRecord.getEntry
> -------------------------------------------------
>
>                 Key: OAK-12451
>                 URL: https://issues.apache.org/jira/browse/OAK-12451
>             Project: Jackrabbit Oak
>          Issue Type: Improvement
>          Components: segment-tar
>            Reporter: Lucas Weitzendorf
>            Priority: Major
>             Fix For: 2.8.0
>
>
> {{ListRecord.getEntry(int)}} goes through a bucket even when the list has a 
> single level ({{bucketSize == 1}}). That allocates a throwaway one-element 
> {{ListRecord}} on every call. This is the hot path for reading a node's 
> property records. {{getEntries(int, int, List)}} already has a {{bucketSize 
> == 1}} branch, and this adds the same branch to {{getEntry}}, reading the 
> record ID directly.
> JMH (JDK 23) per call: 1.33 -> 0.38 ns/op, 24 -> ~0 B/op.
> Test: {{RecordTest#testManyPropertiesRoundTrip}} covers single-level and 
> multi-level property lists (1, 2, 255, 256, 300 and 1,000 properties).



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to