Conversation
Contributor
Author
|
Based on golang/go#78893 this might address internal issue b/498089396 - though I don't remember enough about how internal stuff works so maybe the internal stuff already gets the benefit of this optimization. @milantracy or @konstantin-s-bogom this might be relevant to your interests. |
kerumeto
approved these changes
Sep 22, 2026
Contributor
Author
|
Thanks @kerumeto! Could you please run the import? |
Contributor
|
Apologies, was waiting for a second reviewer but will get that later |
Contributor
Author
|
Looks like there's a busted license check in the import #14941? Anything I can do? |
Collaborator
|
Yes, see the error message on BuildKite: |
Package.Serialize calls objectpath.For separately for each object, which creates a fresh encoder each time. Reuse one encoder for the package and update x/tools to v0.45.0, which includes the upstream fix for quadratic object-path searches [1, 2]. Update the affected Go dependencies, their Bazel declarations, and their license audit records together. Preserve package facts and exported object facts through a serialization round trip, and add a benchmark of the serializer over increasing numbers of fields. Reset the encoder after a recovered panic so a failed lookup cannot leave an incomplete index for subsequent objects. [1]: golang/go#78893 [2]: golang/tools@093c2dd Assisted-by: Codex
tamird
force-pushed
the
nogo-objectpath-encoder
branch
from
September 24, 2026 12:43
7d8a944 to
63a6d5e
Compare
Contributor
Author
|
Updated! |
Contributor
Author
|
@kerumeto could I get a fresh import please? |
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.
Nogo calls objectpath.For separately for each object whose facts it serializes, creating a fresh encoder each time. Reuse one encoder per package and update x/tools to v0.45.0, which includes the upstream fix for quadratic object-path searches 1 2. Update the required Go dependencies, their Bazel declarations, and their license audit records together.
Reset the encoder after a recovered panic so an incomplete index cannot affect subsequent objects. Add coverage for serialization of package and exported-object facts, plus a benchmark over increasing numbers of fields.
Assisted-by: Codex