Skip to content

[Bug]: Possible performance issues with remote cache #2715

@njlr

Description

@njlr

What happened?

With a small Webpack project built with rules_js, a no-change build is slower than expected with a warm remote cache.

Most of the time appears to be going to NpmPackageExtract steps.

Time spent on a fresh build:

INFO: Found 1 target...
Target //app:bundle up-to-date:
  bazel-bin/app/out
INFO: Elapsed time: 123.940s, Critical Path: 47.52s
INFO: 7689 processes: 5415 internal, 2179 linux-sandbox, 95 local.
INFO: Build completed successfully, 7689 total actions

Time spent on a build with warm remote cache (common CI scenario):

INFO: Found 1 target...
Target //app:bundle up-to-date:
  bazel-bin/app/out
INFO: Elapsed time: 10.182s, Critical Path: 1.76s
INFO: 7689 processes: 2274 remote cache hit, 5415 internal.
INFO: Build completed successfully, 7689 total actions

Full repro: https://github.com/njlr/rules_js_remote_cache_repro

Version

Development (host) and target OS/architectures:

Output of bazel --version:

bazel 7.7.1

Version of the Aspect rules, or other relevant rules from your
WORKSPACE or MODULE.bazel file:

https://github.com/njlr/rules_js_remote_cache_repro/blob/master/MODULE.bazel

Language(s) and/or frameworks involved: None

How to reproduce

Full repro: https://github.com/njlr/rules_js_remote_cache_repro

Any other information?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions