[Digikam-devel] [Bug 161783] exif autorotation on import should be backgrounded / pipelined

Gilles Caulier caulier.gilles at gmail.com
Tue Jun 12 20:37:28 BST 2012


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

Gilles Caulier <caulier.gilles at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |caulier.gilles at gmail.com
            Version|0.9.3                       |3.0.0

--- Comment #10 from Gilles Caulier <caulier.gilles at gmail.com> ---
Islam,

In your code, you have used QtConcurrentRun, QFuture, and QFutureWatcher.

KDE provide a more simplest way to manage parallelization of thread, through
ThreadWeaver KDE API :

http://api.kde.org/4.8-api/kdelibs-apidocs/threadweaver/html/index.html

We already use it in kipi-plugins with this wrapper class :

https://projects.kde.org/projects/extragear/graphics/kipi-plugins/repository/revisions/master/show/common/libkipiplugins/tools/threads

We use it already in some plugins based on ActionThread Class as
CameraControler :

https://projects.kde.org/projects/extragear/graphics/kipi-plugins/repository/revisions/master/entry/dngconverter/plugin/actionthread.h#L47

https://projects.kde.org/projects/extragear/graphics/kipi-plugins/repository/revisions/master/entry/jpeglossless/plugin/actionthread.h#L47

https://projects.kde.org/projects/extragear/graphics/kipi-plugins/repository/revisions/master/entry/timeadjust/actionthread.h#L49

https://projects.kde.org/projects/extragear/graphics/kipi-plugins/repository/revisions/master/entry/rawconverter/manager/actionthread.h#L55

The goal is to run more than one thread at the same time, according with CPU
core available. For ex, if you use an i5 computer, 4 core are available, so 4
images are processed at the same time.

Look the test implementation done in kipi-plugins based on JPEGLossLess core
tool :

https://projects.kde.org/projects/extragear/graphics/kipi-plugins/repository/revisions/master/show/tests/multithreading

... it's a stand alone test program...

I don't have checked/tested your code, but if you try to parallelize processing
in digiKam import tool, i recommend highly to use kpactionthreadbase.cpp
implementation in digiKam core. Personally, i plan to use it into
BatchQueueManager in the future. i will share this class between kipi-plugins
and digiKam through libkdcraw or libkexiv2 (both depend of this libraries).

What do you think about ?

Gilles Caulier

-- 
You are receiving this mail because:
You are the assignee for the bug.



More information about the Digikam-devel mailing list