Changeset 222160 in webkit


Ignore:
Timestamp:
Sep 18, 2017 9:54:44 AM (7 years ago)
Author:
timothy_horton@apple.com
Message:

build-webkit spawns fewer subprocesses than ninja uses by default
https://bugs.webkit.org/show_bug.cgi?id=177057

Reviewed by Alex Christensen.

  • Scripts/build-webkit:

By default, ninja will parallelize over (cores + 2) jobs. build-webkit
specifies -j(cores), which overrides this. Remove our override if building
with ninja; just let it do its own thing. In my testing, this minor
change is the difference between ~10% idle CPU time and 0.

Location:
trunk/Tools
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/ChangeLog

    r222159 r222160  
     12017-09-18  Tim Horton  <timothy_horton@apple.com>
     2
     3        build-webkit spawns fewer subprocesses than ninja uses by default
     4        https://bugs.webkit.org/show_bug.cgi?id=177057
     5
     6        Reviewed by Alex Christensen.
     7
     8        * Scripts/build-webkit:
     9        By default, ninja will parallelize over (cores + 2) jobs. build-webkit
     10        specifies -j(cores), which overrides this. Remove our override if building
     11        with ninja; just let it do its own thing. In my testing, this minor
     12        change is the difference between ~10% idle CPU time and 0.
     13
    1142017-09-18  Lucas Forschler  <lforschler@apple.com>
    215
  • trunk/Tools/Scripts/build-webkit

    r221191 r222160  
    240240
    241241if (isCMakeBuild() && !isAnyWindows()) {
    242 
    243     # By default we build using all of the available CPUs.
    244     $makeArgs .= ($makeArgs ? " " : "") . "-j" . numberOfCPUs() if $makeArgs !~ /-j\s*\d+/;
     242    if (!canUseNinja()) {
     243        # By default we build using all of the available CPUs.
     244        # Ninja will automatically determine the number of jobs to run in parallel,
     245        # so don't override the number of jobs if building with Ninja.
     246        $makeArgs .= ($makeArgs ? " " : "") . "-j" . numberOfCPUs() if $makeArgs !~ /-j\s*\d+/;
     247    }
     248
    245249    my $maxCPULoad = maxCPULoad() if $makeArgs !~ /-l\s*\d+\.?\d*/;
    246250    $makeArgs .= " -l" . maxCPULoad() if defined $maxCPULoad;
Note: See TracChangeset for help on using the changeset viewer.