<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>177057</bug_id>
          
          <creation_ts>2017-09-17 14:02:35 -0700</creation_ts>
          <short_desc>build-webkit spawns fewer subprocesses than ninja uses by default</short_desc>
          <delta_ts>2017-09-27 12:26:32 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>New Bugs</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          <dependson>177223</dependson>
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Tim Horton">thorton</reporter>
          <assigned_to name="Tim Horton">thorton</assigned_to>
          <cc>achristensen</cc>
    
    <cc>aestes</cc>
    
    <cc>annulen</cc>
    
    <cc>ap</cc>
    
    <cc>clopez</cc>
    
    <cc>commit-queue</cc>
    
    <cc>ggaren</cc>
    
    <cc>keith_miller</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1349788</commentid>
    <comment_count>0</comment_count>
    <who name="Tim Horton">thorton</who>
    <bug_when>2017-09-17 14:02:35 -0700</bug_when>
    <thetext>build-webkit spawns fewer subprocesses than ninja uses by default</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1349789</commentid>
    <comment_count>1</comment_count>
      <attachid>321054</attachid>
    <who name="Tim Horton">thorton</who>
    <bug_when>2017-09-17 14:02:55 -0700</bug_when>
    <thetext>Created attachment 321054
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1349794</commentid>
    <comment_count>2</comment_count>
      <attachid>321054</attachid>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2017-09-17 14:56:14 -0700</bug_when>
    <thetext>Comment on attachment 321054
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=321054&amp;action=review

&gt; Tools/Scripts/build-webkit:245
&gt; +        # so don&apos;t override the number of jobs if building with Ninja.

Would this number be better when not building with ninja, too? The comment should at least explain why (e.g. “I didn’t test, and didn’t want to make the change blindly”).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1349795</commentid>
    <comment_count>3</comment_count>
      <attachid>321054</attachid>
    <who name="Tim Horton">thorton</who>
    <bug_when>2017-09-17 14:57:48 -0700</bug_when>
    <thetext>Comment on attachment 321054
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=321054&amp;action=review

&gt;&gt; Tools/Scripts/build-webkit:245
&gt;&gt; +        # so don&apos;t override the number of jobs if building with Ninja.
&gt; 
&gt; Would this number be better when not building with ninja, too? The comment should at least explain why (e.g. “I didn’t test, and didn’t want to make the change blindly”).

I considered it, and would happily make the change blindly, but I’m also not sure anybody cares about those builds (it won’t affect Xcode, for example — just non-Windows non-Ninja CMake builds).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1349894</commentid>
    <comment_count>4</comment_count>
      <attachid>321054</attachid>
    <who name="Alex Christensen">achristensen</who>
    <bug_when>2017-09-18 08:13:12 -0700</bug_when>
    <thetext>Comment on attachment 321054
Patch

We should only make this change for ninja, which automatically determines the number of jobs to do at the same time.  If we do this for non-ninja builds, it would make them take ~8x as long because make defaults to using 1 cpu.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1349895</commentid>
    <comment_count>5</comment_count>
    <who name="Tim Horton">thorton</who>
    <bug_when>2017-09-18 08:17:09 -0700</bug_when>
    <thetext>I think (at least I assume) ap meant adding the “+2” to the make invocation</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1349923</commentid>
    <comment_count>6</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2017-09-18 09:20:17 -0700</bug_when>
    <thetext>Correct.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1349947</commentid>
    <comment_count>7</comment_count>
      <attachid>321054</attachid>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2017-09-18 09:54:47 -0700</bug_when>
    <thetext>Comment on attachment 321054
Patch

Clearing flags on attachment: 321054

Committed r222160: &lt;http://trac.webkit.org/changeset/222160&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1349948</commentid>
    <comment_count>8</comment_count>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2017-09-18 09:54:49 -0700</bug_when>
    <thetext>All reviewed patches have been landed.  Closing bug.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1350837</commentid>
    <comment_count>9</comment_count>
      <attachid>321054</attachid>
    <who name="Konstantin Tokarev">annulen</who>
    <bug_when>2017-09-20 10:43:24 -0700</bug_when>
    <thetext>Comment on attachment 321054
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=321054&amp;action=review

&gt; Tools/Scripts/build-webkit:242
&gt;  if (isCMakeBuild() &amp;&amp; !isAnyWindows()) {
&gt; +    if (!canUseNinja()) {

This condition is wrong, $willUseNinja in generateBuildSystemFromCMakeProject() determines what cmake generator is used, and it&apos;s defined as canUseNinja() &amp;&amp; canUseNinjaGenerator()</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1350839</commentid>
    <comment_count>10</comment_count>
    <who name="Konstantin Tokarev">annulen</who>
    <bug_when>2017-09-20 10:45:25 -0700</bug_when>
    <thetext>Though canUseNinjaGenerator can be eleminated, as all required cmake versions should support -G Ninja</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1350840</commentid>
    <comment_count>11</comment_count>
    <who name="Tim Horton">thorton</who>
    <bug_when>2017-09-20 10:50:30 -0700</bug_when>
    <thetext>(In reply to Konstantin Tokarev from comment #10)
&gt; Though canUseNinjaGenerator can be eleminated, as all required cmake
&gt; versions should support -G Ninja

Doesn&apos;t that then make the patch right? :P</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1350848</commentid>
    <comment_count>12</comment_count>
    <who name="Konstantin Tokarev">annulen</who>
    <bug_when>2017-09-20 11:00:11 -0700</bug_when>
    <thetext>Yes, it does. CMake enables Ninja generator on all supported platforms since  v2.8.9 (https://github.com/Kitware/CMake/commit/5d365b26ec6ce089f1a5e0bfed523cb5f916f1da) and we require v3.3</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1350868</commentid>
    <comment_count>13</comment_count>
    <who name="Tim Horton">thorton</who>
    <bug_when>2017-09-20 11:23:59 -0700</bug_when>
    <thetext>Nice</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1351454</commentid>
    <comment_count>14</comment_count>
    <who name="Tim Horton">thorton</who>
    <bug_when>2017-09-21 16:29:37 -0700</bug_when>
    <thetext>Got rid of it in bug 177330</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1351593</commentid>
    <comment_count>15</comment_count>
    <who name="Konstantin Tokarev">annulen</who>
    <bug_when>2017-09-22 03:15:42 -0700</bug_when>
    <thetext>Thanks!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1352162</commentid>
    <comment_count>16</comment_count>
    <who name="Carlos Alberto Lopez Perez">clopez</who>
    <bug_when>2017-09-25 03:33:01 -0700</bug_when>
    <thetext>(In reply to WebKit Commit Bot from comment #7)
&gt; Comment on attachment 321054 [details]
&gt; Patch
&gt; 
&gt; Clearing flags on attachment: 321054
&gt; 
&gt; Committed r222160: &lt;http://trac.webkit.org/changeset/222160&gt;

This patch has broken our bots.

We need to control the number of build parallel process there as we share the machine between several bots (each one run in a container). And if we allow all of them to use all the available cores bad things happen. See bug 177223


I think that when the environment variable NUMBER_OF_PROCESSORS is defined it  should be respected (both for ninja and make). I will try to upload a patch to bug 177223 ASAP</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1353383</commentid>
    <comment_count>17</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2017-09-27 12:26:32 -0700</bug_when>
    <thetext>&lt;rdar://problem/34693285&gt;</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>321054</attachid>
            <date>2017-09-17 14:02:55 -0700</date>
            <delta_ts>2017-09-18 09:54:47 -0700</delta_ts>
            <desc>Patch</desc>
            <filename>bug-177057-20170917140254.patch</filename>
            <type>text/plain</type>
            <size>1793</size>
            <attacher name="Tim Horton">thorton</attacher>
            
              <data encoding="base64">SW5kZXg6IFRvb2xzL0NoYW5nZUxvZwo9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0tLSBUb29scy9DaGFuZ2VMb2cJKHJl
dmlzaW9uIDIyMjEzNykKKysrIFRvb2xzL0NoYW5nZUxvZwkod29ya2luZyBjb3B5KQpAQCAtMSwz
ICsxLDE2IEBACisyMDE3LTA5LTE3ICBUaW0gSG9ydG9uICA8dGltb3RoeV9ob3J0b25AYXBwbGUu
Y29tPgorCisgICAgICAgIGJ1aWxkLXdlYmtpdCBzcGF3bnMgZmV3ZXIgc3VicHJvY2Vzc2VzIHRo
YW4gbmluamEgdXNlcyBieSBkZWZhdWx0CisgICAgICAgIGh0dHBzOi8vYnVncy53ZWJraXQub3Jn
L3Nob3dfYnVnLmNnaT9pZD0xNzcwNTcKKworICAgICAgICBSZXZpZXdlZCBieSBOT0JPRFkgKE9P
UFMhKS4KKworICAgICAgICAqIFNjcmlwdHMvYnVpbGQtd2Via2l0OgorICAgICAgICBCeSBkZWZh
dWx0LCBuaW5qYSB3aWxsIHBhcmFsbGVsaXplIG92ZXIgKGNvcmV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