Bug 180024 - WorkQueue::concurrentApply() and ParallelJobs do the same thing
Summary: WorkQueue::concurrentApply() and ParallelJobs do the same thing
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Template Framework (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-11-26 17:43 PST by Simon Fraser (smfr)
Modified: 2017-11-27 08:19 PST (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Simon Fraser (smfr) 2017-11-26 17:43:48 PST
I don'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), ...)
Comment 1 Sam Weinig 2017-11-26 19:49:43 PST
My preference is to remove ParallelJobs and keep WorkQueue::concurrentApply().
Comment 2 Simon Fraser (smfr) 2017-11-27 08:19:48 PST
Sam says:

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

so that's worth testing.