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

Make ninja incremental bazel builds faster

    • Type: Icon: Improvement Improvement
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Build
    • 0

      Ninja can find most of the dependent targets to pass to bazel in order to not need to build everything. Below are example findings from some prototyping.

      # build base files for test
      ninja -f fast.ninja +bson_test 
      
      # add code change to src/mongo/bson/bson_field.h
      time ninja -f fast.ninja +bson_test
      > real	0m59.211s
      
      # add code change to src/mongo/bson/bson_field_test.cpp
      time ninja -f fast.ninja +bson_test
      > real	0m34.088s
      
      # same as above but for opt build profile
      # add code change to src/mongo/bson/bson_field.h
      time ninja -f opt.ninja +bson_test
      > real	1m19.138s
      

      Compared the same test to current master:

      # build base files for test
      ninja -f fast.ninja +bson_test
      
      # add code change to src/mongo/bson/bson_field.h
      time ninja -f fast.ninja +bson_test
      > real	5m50.481s
      

            Assignee:
            daniel.moody@mongodb.com Daniel Moody
            Reporter:
            daniel.moody@mongodb.com Daniel Moody
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated: