nfsantos opened a new pull request, #3147: URL: https://github.com/apache/jackrabbit-oak/pull/3147
https://issues.apache.org/jira/browse/OAK-12412 `ImmutableRecordNumbers`'s iterator resolves each entry's record type via `RecordType.values()[type[pos]]` inside `computeNext()`/`getType()`. `Enum.values()` allocates and returns a new array on every call, so this array is needlessly re-allocated once per iterated entry. The set of `RecordType` values is fixed, so cache the array once in a `private static final` field and reuse it from the iterator instead of calling `RecordType.values()` per entry. No behavioral change intended. ## Test plan - [x] `mvn -pl oak-segment-tar test -Dtest=ImmutableRecordNumbersTest,RecordNumbersTest` passes -- 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]
