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

Julian Reschke closed OAK-12414.
--------------------------------

> Simplify and pre-size list-record bucket construction in DefaultSegmentWriter
> -----------------------------------------------------------------------------
>
>                 Key: OAK-12414
>                 URL: https://issues.apache.org/jira/browse/OAK-12414
>             Project: Jackrabbit Oak
>          Issue Type: Improvement
>          Components: segment-tar
>            Reporter: Nuno Santos
>            Priority: Major
>             Fix For: 2.8.0
>
>
> {{DefaultSegmentWriter}}'s list-record writer builds each level of buckets 
> via {{ListUtils.partitionList(thisLevel, ListRecord.LEVEL\_SIZE)}}, which 
> materializes an intermediate sub-list per bucket, and appends the result to 
> an unsized {{ArrayList}} for the next level.
> Since the number of buckets per level is a simple ceiling division ({{(size + 
> levelSize - 1) / levelSize}}), the next-level list can be pre-sized up front, 
> and each bucket can be addressed directly via {{thisLevel.subList(i, end)}} 
> over the current level instead of building it through 
> {{ListUtils.partitionList}}.
> No behavioral change intended.



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

Reply via email to