<?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>180024</bug_id>
          
          <creation_ts>2017-11-26 17:43:48 -0800</creation_ts>
          <short_desc>WorkQueue::concurrentApply() and ParallelJobs do the same thing</short_desc>
          <delta_ts>2017-11-27 08:19:48 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Web Template Framework</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Simon Fraser (smfr)">simon.fraser</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>sam</cc>
    
    <cc>simon.fraser</cc>
    
    <cc>thorton</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1374793</commentid>
    <comment_count>0</comment_count>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2017-11-26 17:43:48 -0800</bug_when>
    <thetext>I don&apos;t know why we need both WorkQueue::concurrentApply() and ParallelJobs::execute(), which seems to do the same thing.

For Cocoa at least, both do:

    dispatch_apply(iterations, dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ...)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1374816</commentid>
    <comment_count>1</comment_count>
    <who name="Sam Weinig">sam</who>
    <bug_when>2017-11-26 19:49:43 -0800</bug_when>
    <thetext>My preference is to remove ParallelJobs and keep WorkQueue::concurrentApply().</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1374928</commentid>
    <comment_count>2</comment_count>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2017-11-27 08:19:48 -0800</bug_when>
    <thetext>Sam says:

&gt; &gt; Source/WebCore/platform/graphics/filters/FEMorphology.cpp:195
&gt; &gt;          ParallelJobs&lt;PlatformApplyParameters&gt; parallelJobs(&amp;WebCore::FEMorphology::platformApplyWorker, optimalThreadNumber);
&gt; 
&gt; No strictly related to this patch, but I checked what we were using for
&gt; ParallelJobs, saw that ParallelJobsLibdispatch (which I assume we are using)
&gt; uses dispatch_apply with a global queue. I believe using DISPATCH_APPLY_AUTO
&gt; for the queue will work better.

so that&apos;s worth testing.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>