Skip to content

perf: reduce per-action overhead registering NpmPackageExtract#2910

Open
jbedard wants to merge 1 commit into
aspect-build:mainfrom
jbedard:perf-extract-action-args
Open

perf: reduce per-action overhead registering NpmPackageExtract#2910
jbedard wants to merge 1 commit into
aspect-build:mainfrom
jbedard:perf-extract-action-args

Conversation

@jbedard

@jbedard jbedard commented Jul 9, 2026

Copy link
Copy Markdown
Member

Build the tar argument list with a single add_all call, hoist the constant execution_requirements dict, and skip the --exclude pass when exclude_package_contents is empty. The rendered command line is unchanged.

Changes are visible to end-users: no

Test plan

  • Covered by existing test cases

@jbedard jbedard requested review from acozzette and dzbarsky July 9, 2026 04:11
@jbedard jbedard enabled auto-merge (squash) July 9, 2026 04:11

@dzbarsky dzbarsky left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

curious how you measured an improvement?

@jbedard

jbedard commented Jul 9, 2026

Copy link
Copy Markdown
Member Author

A robot measured it somehow. In this case I'll blindly accept that since it's literally converting 7 invocations and 1 array creation into 1-2 invocations and 1 array creation. I think that's a win no matter what? But any changes you think are questionable please flag them and I'll analyze them individually...

These were all robot suggestions after analyzing build --nobuild --starlark_cpu_profile on a large repo, FWIW

@jbedard jbedard disabled auto-merge July 9, 2026 17:29
Build the tar argument list with a single add_all call, hoist the
constant execution_requirements dict, and skip the --exclude pass when
exclude_package_contents is empty. The rendered command line is
unchanged.
@jbedard jbedard force-pushed the perf-extract-action-args branch from 543fa75 to a0bce6f Compare July 9, 2026 17:30
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.

3 participants