nfsantos opened a new pull request, #3149: URL: https://github.com/apache/jackrabbit-oak/pull/3149
https://issues.apache.org/jira/browse/OAK-12414 `DefaultSegmentWriter`'s list-record writer built each level of buckets via `ListUtils.partitionList(thisLevel, ListRecord.LEVEL_SIZE)`, which materializes an intermediate sub-list per bucket, and appended 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 is now pre-sized up front, and each bucket is addressed directly via `thisLevel.subList(i, end)` over the current level instead of going through `ListUtils.partitionList`. The partition boundaries and bucket contents are unchanged — this only removes the extra copying and the now-unused `ListUtils` import. No behavioral change intended. ## Test plan - [x] `mvn -pl oak-segment-tar test -Dtest=DefaultSegmentWriterTest,SegmentParserTest` passes (65 tests, all exercising `writeList`) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
