Optimize classpath pre-processing in java_stub_template.txt#19481
Closed
rsalvador wants to merge 2 commits intobazelbuild:masterfrom
Closed
Optimize classpath pre-processing in java_stub_template.txt#19481rsalvador wants to merge 2 commits intobazelbuild:masterfrom
rsalvador wants to merge 2 commits intobazelbuild:masterfrom
Conversation
Collaborator
Member
|
Hi @rsalvador, Could you please take a look at the failing checks? |
Contributor
Author
|
Hi @sgowroji, seems to be an infra I see other PRs that trigger a darwin build also failing with the same error. |
mai93
approved these changes
Sep 11, 2023
Contributor
Author
|
Could this fix be available in the 6.4.0 release? Do I need to do anything for that? |
Collaborator
|
@bazel-io flag |
Member
|
@bazel-io fork 6.4.0 |
bazel-io
pushed a commit
to bazel-io/bazel
that referenced
this pull request
Sep 11, 2023
The classpath pre-processing in this `java_stub_template.txt` loop: https://github.com/bazelbuild/bazel/blob/fcfcb929366dd3faac9643302b19c88bcf871ec6/src/main/java/com/google/devtools/build/lib/bazel/rules/java/java_stub_template.txt#L309 is slow for long classpaths. For example for classpaths with ~250,000 and ~700,000 entries the loop takes 28 and 50 seconds, respectively, on an intel MacBook. This change reduce the times to 1 second or less. Fixes bazelbuild#19480 Closes bazelbuild#19481. PiperOrigin-RevId: 564491123 Change-Id: Id4be898c3f800d5390dd8bf997535a5e71a76ba3
iancha1992
pushed a commit
that referenced
this pull request
Sep 12, 2023
…19491) The classpath pre-processing in this `java_stub_template.txt` loop: https://github.com/bazelbuild/bazel/blob/fcfcb929366dd3faac9643302b19c88bcf871ec6/src/main/java/com/google/devtools/build/lib/bazel/rules/java/java_stub_template.txt#L309 is slow for long classpaths. For example for classpaths with ~250,000 and ~700,000 entries the loop takes 28 and 50 seconds, respectively, on an intel MacBook. This change reduce the times to 1 second or less. Fixes #19480 Closes #19481. Commit 4e8f0bd PiperOrigin-RevId: 564491123 Change-Id: Id4be898c3f800d5390dd8bf997535a5e71a76ba3 Co-authored-by: Roman Salvador <rsalvador@salesforce.com>
SalmaSamy
pushed a commit
that referenced
this pull request
Sep 13, 2023
…19491) The classpath pre-processing in this `java_stub_template.txt` loop: https://github.com/bazelbuild/bazel/blob/fcfcb929366dd3faac9643302b19c88bcf871ec6/src/main/java/com/google/devtools/build/lib/bazel/rules/java/java_stub_template.txt#L309 is slow for long classpaths. For example for classpaths with ~250,000 and ~700,000 entries the loop takes 28 and 50 seconds, respectively, on an intel MacBook. This change reduce the times to 1 second or less. Fixes #19480 Closes #19481. Commit 4e8f0bd PiperOrigin-RevId: 564491123 Change-Id: Id4be898c3f800d5390dd8bf997535a5e71a76ba3 Co-authored-by: Roman Salvador <rsalvador@salesforce.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The classpath pre-processing in this
java_stub_template.txtloop:bazel/src/main/java/com/google/devtools/build/lib/bazel/rules/java/java_stub_template.txt
Line 309 in fcfcb92
Fixes #19480