Skip to content

perf: avoid temp sort key arrays in sortStringExprs - #1487

Open
jbedard wants to merge 1 commit into
bazel-contrib:mainfrom
jbedard:sortStringList-no-tmp
Open

perf: avoid temp sort key arrays in sortStringExprs#1487
jbedard wants to merge 1 commit into
bazel-contrib:mainfrom
jbedard:sortStringList-no-tmp

Conversation

@jbedard

@jbedard jbedard commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

Buildtools PR checklist

  • The code in this PR is covered by unit/integration tests.
  • I have tested these changes and provide testing instructions below.
  • I have either responded to, or resolved all Gemini comments on the PR.
  • I have read Google Eng Practices on Small Changes, this PR either follows these guidelines or the description provides reasoning for why they can not be followed.

Description

Sorting is now allocation-free apart from boxing the chunk into a sort.Interface (a TODO notes the slices.SortStableFunc replacement once the go directive reaches 1.21).

Added unit tests for odd edge cases to ensure they do not change.

@jbedard
jbedard requested a review from a team as a code owner August 17, 2026 00:26
@jbedard
jbedard requested review from vladmos and removed request for a team August 17, 2026 00:26
jayconrod pushed a commit to bazel-contrib/bazel-gazelle that referenced this pull request Aug 18, 2026
**What type of PR is this?**

Perf - memory reduction.

**What package or component does this PR mostly affect?**

all

**What does this PR do? Why is it needed?**

Same as bazel-contrib/buildtools#1487 where this
code was vendored from.

**Which issues(s) does this PR fix?**

Fixes #

**Other notes for review**
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant