[webkit-dev] Turn on the PARALLEL_JOBS feature by default

Balazs Kelemen kbalazs at webkit.org
Tue Oct 18 07:27:14 PDT 2011

    Hi Webkittens!

I am planning to turn on the ENABLE_PARALLEL_JOBS feature by default. It 
is tracked in https://bugs.webkit.org/show_bug.cgi?id=70032. This 
feature has proved to be an efficient optimization for some SVG filters 
where it has been applied. Naturally it could be used in other areas as 
well in the future. It supports a fork-and-join threading scheme thus it 
can be used for computations where the task can be divided to 
independent sub-tasks. It plays well with the platform: for Mac it has a 
libdispatch based implementation. For other platforms it has a generic 
and an openmp based one - the latter is used only in -fopenmp builds. 
With the Methanol benchmark - https://gitorious.org/methanol - our 
measurements showed a 60% speedup for SVG filters on a 6 core MacPro 
(libdispatch implementation) and 40% gain on my 4 core i5 desktop 
(generic implementation).
The cost of enabling the feature is a few extra thread creation with the 
generic backend. The maximum of thread creations is the number of cores 
in the system since the implementation using a basic thread-pool for the 
parallel threads. With libdispatch it's cheaper because the system 
handles the thread allocation for us. In the case of openmp the cost is 
implementation specific but normally it should also has an internal 
thread pool. Finally, for !ENABLE(FILTERS) builds there is no cost at 
all currently.
Please tell me if you have any concerns about enabling the feature.


More information about the webkit-dev mailing list