RFR: 8342040: Further improve entry lookup performance for multi-release JARs [v3]
Eirik Bjørsnøs
eirbjo at openjdk.org
Fri Oct 18 15:08:54 UTC 2024
On Fri, 18 Oct 2024 13:41:55 GMT, Claes Redestad <redestad at openjdk.org> wrote:
>> Eirik Bjørsnøs has updated the pull request incrementally with four additional commits since the last revision:
>>
>> - Map versions by entry name hashcode instead of by entry name. This avoids String allocation and storage
>> - Merge pull request #1 from cl4es/bitset_versions
>>
>> Use BitSet to streamline construction
>> - Fix traversal, traverse backwards to pick latest applicable version
>> - Use BitSet to streamline construction
>
> Marked as reviewed by redestad (Reviewer).
Bringing this back from draft mode after some feedback and exploration with @cl4es
The current version of this PR now uses a BitSet to represent versions. This speeds up version tracking in `initCEN` for the unusual case that there is a large number of versioned entries in the ZIP.
To summarize the performance benefits of this PR over baseline:
* The lookup overhead of multi-release with a few versioned entries is reduced from 5X to 1.2X
* For missing entries (very common in URLClassPath!), the overhead is reduced from 10X to 1.8X
Claes has approved this PR already, but since he contributed code and ideas to this PR, I'll let this linger until early next week to allow non-Scandinavian reviewers to have a look :-)
-------------
PR Comment: https://git.openjdk.org/jdk/pull/21489#issuecomment-2422677947
More information about the security-dev
mailing list