[Digikam-devel] [Bug 254033] batch queue manager should use all or more CPU cores

Marcel Wiesweg marcel.wiesweg at gmx.de
Wed Oct 13 16:12:43 BST 2010


https://bugs.kde.org/show_bug.cgi?id=254033





--- Comment #7 from Marcel Wiesweg <marcel wiesweg gmx de>  2010-10-13 17:12:37 ---
There are two approaches which could be called linear and parallel:

1) Linear: Each processing step ("worker object") lives in its own thread. An
image is sent to the first worker, processed, then sent to the next worker.

2) Parallel: A processing step is provided by n threads, processing n different
images at a time. 
The maximum version of this would be to provide the full pipeline parallely in
n threads.

You can combine the approaches. If you look at the FacePipeline for face
detection, it is mainly based on the linear approach, but for one segment
(detection, the most expensive step), it parallelizes using more than one
detector. The situation is a bit different though, because some tasks cannot be
parallelized because they are mutex-protected (database access, recognition
database), so the linear approach is natural.

With BQM, I think, all tasks can be parallelized without restriction. We must
only care for memory demands - if you've got a hundred images to process, you
dont want to load them into memory at once. There's
QThreadPool::idealThreadCount as well.

Have a look in libs/threads/. Probably neither DynamicThread nor WorkerObject
fit perfectly into the task, but could be helpful. We can also write a third
taste of threading class.

-- 
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the Digikam-devel mailing list