-
Notifications
You must be signed in to change notification settings - Fork 6.2k
8310837: Use ByteArrayLittleEndian in java.util.zip #14632
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
👋 Welcome back Glavo! A progress list of the required criteria for merging this PR into |
|
Looks great. Created https://bugs.openjdk.org/browse/JDK-8310837 for your patch. |
Webrevs
|
|
@LanceAndersen This one is going to require checking that startup isn't impacted. |
| */ | ||
| public static long getUnsignedInt(byte[] array, int offset) { | ||
| return Integer.toUnsignedLong((int) INT.get(array, offset)); | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello Glavo, I was going to recommend adding a test method to existing jtreg tests to test these new methods. But it looks like there's no jtreg test for this ByteArrayLittleEndian class. Would you mind creating a new test class to (at least) test these methods?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello Glavo, I was going to recommend adding a test method to existing jtreg tests to test these new methods. But it looks like there's no jtreg test for this
ByteArrayLittleEndianclass. Would you mind creating a new test class to (at least) test these methods?
I think I could modify test/jdk/jdk/internal/util/ByteArray/ReadWriteValues.java to also test ByteArrayLittleEndian.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added a test for ByteArrayLittleEndian in #14636
|
On an existing Java runtime, I had a quick look at the classes loaded at application startup to see if P.S: I just noticed Alan has a similar comment about startup performance, so yes, having some numbers for a startup benchmark would be useful. |
|
@AlanBateman @jaikiran Sorry, I thought about its possible impact on startup time, but I don't know which tests can be used to test JVM startup time. Can you tell me some relevant tests? In fact, I now have a branch(#14636) that rewrites I tested its performance with the |
|
Hello Glavo,
I think this PR should then wait for a bit to see what comes out of #14636. That will then help us understand what kind of additional testing might have to be considered for this current PR. |
ZipFS has a slightly different macro for I think as we compare performance, we also should strive for consistency between Zip and ZipFS implementation as well |
Can we move If there's no reason to stop us from doing this, I can open a new PR to do this after this PR is merged. |
We shouldn't rush into that as it it creates coupling between java.base and jdk.zipfs that is problematic for maintenance, integrity and security. Need to be careful with every qualified exports that is added. |
Oh well. I'm just confused as to why these few classes are being duplicated, is it for historical reasons? Another question that confuses me is why |
|
@Glavo This pull request has been inactive for more than 4 weeks and will be automatically closed if another 4 weeks passes without any activity. To avoid this, simply add a new comment to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration! |
|
@Glavo This pull request has been inactive for more than 8 weeks and will now be automatically closed. If you would like to continue working on this pull request in the future, feel free to reopen it! This can be done using the |
|
/open |
|
@Glavo This pull request is now open |
|
@Glavo This pull request has been inactive for more than 4 weeks and will be automatically closed if another 4 weeks passes without any activity. To avoid this, simply add a new comment to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration! |
Now that |
|
@Glavo This pull request has been inactive for more than 4 weeks and will be automatically closed if another 4 weeks passes without any activity. To avoid this, simply add a new comment to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration! |
|
@Glavo This pull request has been inactive for more than 8 weeks and will now be automatically closed. If you would like to continue working on this pull request in the future, feel free to reopen it! This can be done using the |
|
/open |
|
@Glavo This pull request is now open |
|
@Glavo This pull request has been inactive for more than 4 weeks and will be automatically closed if another 4 weeks passes without any activity. To avoid this, simply add a new comment to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration! |
|
Hello Glavo, I see that you are interested in pursuing this change further. Would you mind getting the latest micro benchmark numbers which this proposed change? I see that your PR description has a run from some time back, getting a latest one would be useful. Additionally, I see that #14636 where you had proposed a test case for the |
I've moved those changes into this PR and am running tests. I'll push these changes once the tests are finished running. |
|
I ran the tier1 tests with no failures. |
|
@jaikiran Can you review this PR again? |
|
@Glavo This pull request has been inactive for more than 4 weeks and will be automatically closed if another 4 weeks passes without any activity. To avoid this, simply add a new comment to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration! |
|
Hello Glavo, I'll need some more time on this to review this. In the meantime, could you update the micro benchmark latest numbers with this latest state? |
|
Nice with better testing for the utility classes. |
|
As mentioned earlier, it would be beneficial to measure the potential benefit of this proposed change with ZipFS which has similar albeit slightly different approach to the macros and include as part of this PR of a follow-on PR |
Latest results: Benchmark (size) Mode Cnt Score Error Units
- ZipFileOpen.openCloseZipFile 512 avgt 15 55411.637 ± 2010.322 ns/op
+ ZipFileOpen.openCloseZipFile 512 avgt 15 53247.244 ± 602.826 ns/op
- ZipFileOpen.openCloseZipFile 1024 avgt 15 99983.208 ± 374.463 ns/op
+ ZipFileOpen.openCloseZipFile 1024 avgt 15 96463.939 ± 273.324 ns/op
- ZipFileOpen.openCloseZipFilex2 512 avgt 15 57308.739 ± 1627.708 ns/op
+ ZipFileOpen.openCloseZipFilex2 512 avgt 15 54735.296 ± 241.473 ns/op
- ZipFileOpen.openCloseZipFilex2 1024 avgt 15 102068.887 ± 318.778 ns/op
+ ZipFileOpen.openCloseZipFilex2 1024 avgt 15 98095.240 ± 319.524 ns/op |
|
❗ This change is not yet ready to be integrated. |
|
@Glavo This pull request has been inactive for more than 4 weeks and will be automatically closed if another 4 weeks passes without any activity. To avoid this, simply add a new comment to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration! |
|
@Glavo This pull request has been inactive for more than 8 weeks and will now be automatically closed. If you would like to continue working on this pull request in the future, feel free to reopen it! This can be done using the |
|
/open |
|
@Glavo This pull request is now open |
|
@cl4es Can you take a look at this performance improvement patch? |
|
I've been busy working on other projects lately, so I've put these PRs on hold. If anyone cares to take a look at them I'll be right back. |
|
@Glavo This pull request has been inactive for more than 4 weeks and will be automatically closed if another 4 weeks passes without any activity. To avoid this, simply add a new comment to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration! |
|
@Glavo This pull request has been inactive for more than 8 weeks and will now be automatically closed. If you would like to continue working on this pull request in the future, feel free to reopen it! This can be done using the |
Using
ByteArrayLittleEndianis simpler and faster.make test TEST="micro:java.util.zip.ZipFileOpen":Progress
Issue
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/14632/head:pull/14632$ git checkout pull/14632Update a local copy of the PR:
$ git checkout pull/14632$ git pull https://git.openjdk.org/jdk.git pull/14632/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 14632View PR using the GUI difftool:
$ git pr show -t 14632Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/14632.diff
Webrev
Link to Webrev Comment