Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[7.1.0] Restart at most once when prepopulating repository rule environment #20643

Merged
merged 4 commits into from
Jan 9, 2024

Commits on Dec 21, 2023

  1. Restart at most once when prepopulating repository rule environment

    When a repository rule is fetch attributes are iterated over in `enforceLabelAttributes` to prepopulate the environment, restarting the fetch each time a new dependency is discovered.
    
    This is faster than calling `repository_ctx.path(...)` early in the repository rule implementation function but still has considerable overhead.
    
    This PR defers throwing `NeedsSkyframeRestartException` till after every attribute has been processed, greatly reducing the number of restarts and iterations.
    
    In an internal project these optimisations are particularly noticeable.
    Before: 2min 8s, 2min 7s
    After: 1min 35s, 1min 27s
    
    Closes bazelbuild#20434.
    
    PiperOrigin-RevId: 588090528
    Change-Id: I7917b137d6e60b6d6a73189cf396418a85b3ec28
    Silic0nS0ldier authored and bazel-io committed Dec 21, 2023
    Configuration menu
    Copy the full SHA
    be9fb70 View commit details
    Browse the repository at this point in the history

Commits on Jan 4, 2024

  1. Configuration menu
    Copy the full SHA
    6edc4e7 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    8ef1748 View commit details
    Browse the repository at this point in the history

Commits on Jan 9, 2024

  1. Configuration menu
    Copy the full SHA
    e922b4f View commit details
    Browse the repository at this point in the history