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

Improve performance of parsing unknown fields in Java #9371

Merged
merged 1 commit into from
Jan 5, 2022

Conversation

acozzette
Copy link
Member

Credit should go to @elharo for most of these Java changes--I am just
cherry-picking them from our internal codebase. The one thing I did
change was to give the UTF-8 validation tests their own Bazel test
target. This makes it possible to give the other tests a shorter
timeout, which is important for UnknownFieldSetPerformanceTest in
particular.

Copy link
Contributor

@elharo elharo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure why the tests are failing. Has CI gone flaky again?

@@ -0,0 +1,78 @@
// Protocol Buffers - Google's data interchange format
// Copyright 2008 Google Inc. All rights reserved.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2021 and otherwise update to current guidelines for copyright statements

Credit should go to @elharo for most of these Java changes--I am just
cherry-picking them from our internal codebase. The one thing I did
change was to give the UTF-8 validation tests their own Bazel test
target. This makes it possible to give the other tests a shorter
timeout, which is important for UnknownFieldSetPerformanceTest in
particular.
Copy link
Contributor

@elharo elharo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test failures look related:

++ '[' '!' -z 'java/core/src/test/java/com/google/protobuf/UnknownFieldSetPerformanceTest.java ' ']'
++ echo 'Missing files in EXTRA_DIST: java/core/src/test/java/com/google/protobuf/UnknownFieldSetPerformanceTest.java '
Missing files in EXTRA_DIST: java/core/src/test/java/com/google/protobuf/UnknownFieldSetPerformanceTest.java
++ exit 1

@acozzette
Copy link
Member Author

#9372 should fix the Ruby build failure if I understand the problem right.

@@ -232,6 +232,7 @@
<exclude>TypeRegistryTest.java</exclude>
<exclude>UnknownEnumValueTest.java</exclude>
<exclude>UnknownFieldSetLiteTest.java</exclude>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not new, but why are we excluding the lite test here? Worth a look.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, good question. I'm not sure why.

@acozzette acozzette merged commit c555c3d into protocolbuffers:master Jan 5, 2022
@acozzette acozzette deleted the java-unknown-fields branch January 5, 2022 16:50
acozzette added a commit to acozzette/protobuf that referenced this pull request Jan 5, 2022
…s#9371)

Credit should go to @elharo for most of these Java changes--I am just
cherry-picking them from our internal codebase. The one thing I did
change was to give the UTF-8 validation tests their own Bazel test
target. This makes it possible to give the other tests a shorter
timeout, which is important for UnknownFieldSetPerformanceTest in
particular.
acozzette added a commit to acozzette/protobuf that referenced this pull request Jan 5, 2022
…s#9371)

Credit should go to @elharo for most of these Java changes--I am just
cherry-picking them from our internal codebase. The one thing I did
change was to give the UTF-8 validation tests their own Bazel test
target. This makes it possible to give the other tests a shorter
timeout, which is important for UnknownFieldSetPerformanceTest in
particular.
acozzette added a commit to acozzette/protobuf that referenced this pull request Jan 5, 2022
…s#9371)

Credit should go to @elharo for most of these Java changes--I am just
cherry-picking them from our internal codebase. The one thing I did
change was to give the UTF-8 validation tests their own Bazel test
target. This makes it possible to give the other tests a shorter
timeout, which is important for UnknownFieldSetPerformanceTest in
particular.
acozzette added a commit that referenced this pull request Jan 5, 2022
Credit should go to @elharo for most of these Java changes--I am just
cherry-picking them from our internal codebase. The one thing I did
change was to give the UTF-8 validation tests their own Bazel test
target. This makes it possible to give the other tests a shorter
timeout, which is important for UnknownFieldSetPerformanceTest in
particular.
acozzette added a commit that referenced this pull request Jan 5, 2022
Credit should go to @elharo for most of these Java changes--I am just
cherry-picking them from our internal codebase. The one thing I did
change was to give the UTF-8 validation tests their own Bazel test
target. This makes it possible to give the other tests a shorter
timeout, which is important for UnknownFieldSetPerformanceTest in
particular.
acozzette added a commit to acozzette/protobuf that referenced this pull request Jan 5, 2022
…s#9371)

Credit should go to @elharo for most of these Java changes--I am just
cherry-picking them from our internal codebase. The one thing I did
change was to give the UTF-8 validation tests their own Bazel test
target. This makes it possible to give the other tests a shorter
timeout, which is important for UnknownFieldSetPerformanceTest in
particular.
acozzette added a commit to acozzette/protobuf that referenced this pull request Jan 5, 2022
…s#9371)

Credit should go to @elharo for most of these Java changes--I am just
cherry-picking them from our internal codebase. The one thing I did
change was to give the UTF-8 validation tests their own Bazel test
target. This makes it possible to give the other tests a shorter
timeout, which is important for UnknownFieldSetPerformanceTest in
particular.
acozzette added a commit that referenced this pull request Jan 5, 2022
Credit should go to @elharo for most of these Java changes--I am just
cherry-picking them from our internal codebase. The one thing I did
change was to give the UTF-8 validation tests their own Bazel test
target. This makes it possible to give the other tests a shorter
timeout, which is important for UnknownFieldSetPerformanceTest in
particular.
@ydroneaud
Copy link

Is this fix going to be applied on 3.17.x branch ?

@acozzette
Copy link
Member Author

No, we're no longer maintaining the 3.17.x branch, so to get this fix you will have to upgrade to at least 3.18.2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants