Summary: | Rotate jpeg images isn't multithreaded. | ||
---|---|---|---|
Product: | [Applications] digikam | Reporter: | Lukas Sommer <sommerluk> |
Component: | Plugin-DImg-JPEG | Assignee: | Digikam Developers <digikam-bugs-null> |
Status: | RESOLVED FIXED | ||
Severity: | wishlist | CC: | caulier.gilles, mike, sommerluk |
Priority: | NOR | Keywords: | junior-jobs |
Version: | 2.3.0 | ||
Target Milestone: | --- | ||
Platform: | openSUSE | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | 2.6.0 | |
Sentry Crash Report: |
Description
Lukas Sommer
2011-12-17 17:44:07 UTC
It use multithreading : https://projects.kde.org/projects/extragear/graphics/kipi-plugins/repository/revisions/master/entry/jpeglossless/plugin/actionthread.cpp#L92 ...through QThread class... Gilles Caulier Yes, but only one thread, processing only one image at once. This wish is about using all available cores, to process several images in parallel. This could be easily done by using QtConcurrent - ideal for a junior-job ;-) Michael QtConcurrent? What is that ? Gilles Caulier QtConcurrent is a multithreading component of Qt, to which you can give a list and a function, and it will call the function in parallel adjusted to the number of cores with all elements in the list. I use it a lot in gpssync. Michael Excelent. Give some link in source code please. This must be used in lots of parts in digiKam Gilles Caulier Maybe it is usefull to limite how many cores are used? I have 6 cores, but it is nice that programs don't use all of them - this keeps other programs responsive. So, maybe the maximal number of parallel processes can be limited, either automatically based on the number of available cores or manually by the user? What do you think? QtConcurrent is for example used to load GPX files in parallel in GPSSync: http://lxr.kde.org/source/extragear/graphics/kipi-plugins/gpssync/gpsdataparser.cpp#97 QtConcurrent documentation: http://developer.qt.nokia.com/doc/qt-4.8/threads-qtconcurrent.html @Lukas: Last time I looked, QtConcurrent only offered to automatically use the number of available cores, and also did not allow you to change the priority of the thread. Maybe KDE's threadweaver [1] allows you to do that. Michael [1] http://api.kde.org/4.0-api/kdelibs-apidocs/threadweaver/html/index.html This have been implemented in digiKam core from git/master by Marcel. digiKam do not use JPEGLossLess plugin to rotate image. A dedicated code from digiKam core do it, and it's multithreaded and parallelized if you have more than one CPU available... This will be available for next 2.6.0 release... Gilles Caulier Thanks a lot! |