Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-97786

Rebuilds in Bazel are slow after a large build

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 8.1.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Build
    • Fully Compatible
    • ALL
    • Hide

      Doesn't repro 100% of the time, but just calling bazel build twice in a row repro's it. Calling it more than 2 times seems to actually be the proper speed.

      Show
      Doesn't repro 100% of the time, but just calling bazel build twice in a row repro's it. Calling it more than 2 times seems to actually be the proper speed.

      Sometimes when rebuilding in Bazel with only a few changes or even no changes Bazel is spending a long time "checking cached actions". The rebuilds should be much faster than they currently are.

       

      Every artifact being returned by either remote execution or the remote cache are being marked as 'changed' by bazel on rebuild. This mean in a situation where you:
      bazel clean

      bazel build //src:foo

      bazel build //src:foo

      bazel build //src:foo

       

      the second build will take a significant amount of time rechecking the first builds outputs. Build three will properly understand the outputs haven't changed and be fast.

            Assignee:
            andrew.bradshaw@mongodb.com Andrew Bradshaw
            Reporter:
            andrew.bradshaw@mongodb.com Andrew Bradshaw
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: