Skip to content
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

8278434: timeouts in test java/time/test/java/time/format/TestZoneTextPrinterParser.java #6790

Closed
wants to merge 4 commits into from

Conversation

naotoj
Copy link
Member

@naotoj naotoj commented Dec 10, 2021

The proposed fix is to address the performance degradation caused by the fix to JDK-8275721. Some amount of the degradation cannot be avoided as the lookup now falls back up to the bundles at Locale.ROOT. However, by lowering the fallback priority of regionFormatFallback than COMPAT's lookup, it can avoid the excess bundle lookups for regions.
I also changed the test case TestZoneTextPrinterParser.java, which currently iterates over 3 nested loops, i.e., all-locales x all-timezones x 8, which is absolutely unnecessary. Made it to sample some locales.
In addition, I added a microbenchmark for the DateFormatSymbols.getZoneStrings() method. Here is the result:

Before the fix to JDK-8275721:

Benchmark                    Mode  Cnt  Score   Error  Units
ZoneStrings.testZoneStrings    ss    5  6.865 ± 0.696   s/op

Before the proposed fix:

Benchmark                    Mode  Cnt   Score   Error  Units
ZoneStrings.testZoneStrings    ss    5  15.741 ± 4.300   s/op

After the proposed fix:

Benchmark                    Mode  Cnt  Score   Error  Units
ZoneStrings.testZoneStrings    ss    5  9.756 ± 3.685   s/op

Progress

  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • Change must be properly reviewed

Issue

  • JDK-8278434: timeouts in test java/time/test/java/time/format/TestZoneTextPrinterParser.java

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.java.net/jdk pull/6790/head:pull/6790
$ git checkout pull/6790

Update a local copy of the PR:
$ git checkout pull/6790
$ git pull https://git.openjdk.java.net/jdk pull/6790/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 6790

View PR using the GUI difftool:
$ git pr show -t 6790

Using diff file

Download this PR as a diff file:
https://git.openjdk.java.net/jdk/pull/6790.diff

@bridgekeeper
Copy link

bridgekeeper bot commented Dec 10, 2021

👋 Welcome back naoto! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk
Copy link

openjdk bot commented Dec 10, 2021

@naotoj The following labels will be automatically applied to this pull request:

  • core-libs
  • i18n

When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing lists. If you would like to change these labels, use the /label pull request command.

@openjdk openjdk bot added core-libs core-libs-dev@openjdk.org i18n i18n-dev@openjdk.org labels Dec 10, 2021
@naotoj naotoj changed the title 8278434: timeouts in test java/time/test/java/time/format/TestZoneTex… 8278434: timeouts in test java/time/test/java/time/format/TestZoneTextPrinterParser.java Dec 11, 2021
@naotoj naotoj marked this pull request as ready for review December 16, 2021 19:51
@openjdk openjdk bot added the rfr Pull request is ready for review label Dec 16, 2021
@mlbridge
Copy link

mlbridge bot commented Dec 16, 2021

Webrevs

@JoeWang-Java
Copy link
Member

It’s nice to see you’ve got most of the performance back. Hope looping through Zone strings isn't really necessary.

@openjdk
Copy link

openjdk bot commented Jan 3, 2022

@naotoj This change now passes all automated pre-integration checks.

ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details.

After integration, the commit message for the final commit will be:

8278434: timeouts in test java/time/test/java/time/format/TestZoneTextPrinterParser.java

Reviewed-by: joehw

You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed.

At the time when this comment was updated there had been 1 new commit pushed to the master branch:

Please see this link for an up-to-date comparison between the source branch of this pull request and the master branch.
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details.

➡️ To integrate this PR with the above commit message to the master branch, type /integrate in a new comment.

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Jan 3, 2022
@naotoj
Copy link
Member Author

naotoj commented Jan 3, 2022

Hope looping through Zone strings isn't really necessary.

Thanks, Joe. IMHO, DateFormatSymbols.getZoneStrings() is badly designed. It just simply exposes the names in the underlying ResourceBundle, and I cannot think of any use cases for this method, rather than using ZoneId or TimeZone's display names retrieval methods.

@naotoj
Copy link
Member Author

naotoj commented Jan 4, 2022

/integrate

@openjdk
Copy link

openjdk bot commented Jan 4, 2022

Going to push as commit 8dc4437.
Since your change was applied there has been 1 commit pushed to the master branch:

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated Pull request has been integrated label Jan 4, 2022
@openjdk openjdk bot closed this Jan 4, 2022
@openjdk openjdk bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels Jan 4, 2022
@openjdk
Copy link

openjdk bot commented Jan 4, 2022

@naotoj Pushed as commit 8dc4437.

💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core-libs core-libs-dev@openjdk.org i18n i18n-dev@openjdk.org integrated Pull request has been integrated
Development

Successfully merging this pull request may close these issues.

2 participants