[Bug 243225] Re: digiKam takes up lots of CPU while rebuilding thumbnails, process should be given lower priority

Bug Watch Updater 243225 at bugs.launchpad.net
Tue Sep 9 08:53:08 UTC 2014


Launchpad has imported 10 comments from the remote bug at
https://bugs.kde.org/show_bug.cgi?id=110658.

If you reply to an imported comment from within Launchpad, your comment
will be sent to the remote bug automatically. Read more about
Launchpad's inter-bugtracker facilities at
https://help.launchpad.net/InterBugTracking.

------------------------------------------------------------------------
On 2005-08-12T21:45:11+00:00 dhjt wrote:

Version:           0.7.3 (using KDE KDE 3.4.1)
Installed from:    Gentoo Packages
OS:                Linux

When I open a album and start a OpenGL slideshow, the slideshow does not
run smoothly because the thumb generation process consumes too many
resources. The only solution seems waiting until all thumbs are
generated before starting a slideshow.

Please lower the process priority of the thumbnail generation process.

Reply at:
https://bugs.launchpad.net/ubuntu/+source/digikam/+bug/243225/comments/0

------------------------------------------------------------------------
On 2005-08-12T22:36:51+00:00 rainer wrote:

If low priority should be implemented it should be an option. I run my
system (P4, 3GHZ) in dynamic mode i.e. the CPU speed is scaled down to
keep the system silent if there is nothing to do. When there is nothing
to do for the cpu it runs at a Speed of 1GHZ producing less heat than
with 3GHZ and less noise. When there is something to do the system
automatically scales up to the full speed of  3GHZ and down again if
there is no active process.

The problem is, that this scaling process to full speed happens only if
the process is *not* running at a low nice level. So when thumb
generation happens at a low nice level I would have the problem that the
thumb generation is very very slow since it would be performed with 1GHZ
speed instead of 3GHZ used now.


Reply at:
https://bugs.launchpad.net/ubuntu/+source/digikam/+bug/243225/comments/1

------------------------------------------------------------------------
On 2006-08-30T12:28:29+00:00 Caulier-gilles-9 wrote:

SVN commit 578815 by cgilles:

digikam from trunk : When the Exif auto-rotation option is canged in
setup dialog, digiKam ask now to user if the new batch tool to re-
generate all albums items thumbnails must be started to refresh thumbs
database.

CCBUGS: 127179, 110658, 128308

 M  +16 -0     setup.cpp  
 M  +25 -5     setupmetadata.cpp  
 M  +4 -1      setupmetadata.h  


--- trunk/extragear/graphics/digikam/utilities/setup/setup.cpp #578814:578815
@@ -30,11 +30,13 @@
 
 #include <klocale.h>
 #include <kiconloader.h>
+#include <kmessagebox.h>
 #include <kconfig.h>
 #include <kapplication.h>
 
 // Local includes.
 
+#include "batchthumbsgenerator.h"
 #include "setupgeneral.h"
 #include "setupmetadata.h"
 #include "setupidentity.h"
@@ -214,6 +216,20 @@
     d->slideshowPage->applySettings();    
     d->iccPage->applySettings();
     d->miscPage->applySettings();
+    
+    if (d->metadataPage->exifAutoRotateAsChanged())
+    {
+        QString msg = i18n("The Exif auto-rotate thumbnails option has been changed.\n"
+                           "Do you want to rebuild all albums items thumbnails now?\n\n"
+                           "Note: thumbnails processing can take a while!");
+        int result = KMessageBox::warningYesNo(this, msg);
+        if (result != KMessageBox::Yes)
+            return;
+
+        BatchThumbsGenerator *thumbsGenerator = new BatchThumbsGenerator(this);
+        thumbsGenerator->exec();
+    }
+
     close();
 }
 
--- trunk/extragear/graphics/digikam/utilities/setup/setupmetadata.cpp #578814:578815
@@ -58,6 +58,7 @@
 
     SetupMetadataPriv()
     {
+        ExifAutoRotateAsChanged   = false;
         saveCommentsBox           = 0;
         ExifRotateBox             = 0;
         ExifSetOrientationBox     = 0;
@@ -68,6 +69,9 @@
         saveCreditsIptcBox        = 0;
     }
 
+    bool       ExifAutoRotateAsChanged;
+    bool       ExifAutoRotateOrg;
+    
     QCheckBox *saveCommentsBox;
     QCheckBox *ExifRotateBox;
     QCheckBox *ExifSetOrientationBox;
@@ -163,16 +167,18 @@
     
     mainLayout->addWidget(hbox);
     mainLayout->addStretch();
+    mainLayout->addWidget(this);
 
+    readSettings();
+    adjustSize();
+  
     // --------------------------------------------------------
 
     connect(exiv2LogoLabel, SIGNAL(leftClickedURL(const QString&)),
             this, SLOT(processExiv2URL(const QString&)));
 
-    readSettings();
-    adjustSize();
-  
-    mainLayout->addWidget(this);
+    connect(d->ExifRotateBox, SIGNAL(toggled(bool)),
+            this, SLOT(slotExifAutoRotateToggled(bool)));
 }
 
 SetupMetadata::~SetupMetadata()
@@ -207,7 +213,8 @@
     AlbumSettings* settings = AlbumSettings::instance();
     if (!settings) return;
 
-    d->ExifRotateBox->setChecked(settings->getExifRotate());
+    d->ExifAutoRotateOrg = settings->getExifRotate();
+    d->ExifRotateBox->setChecked(d->ExifAutoRotateOrg);
     d->ExifSetOrientationBox->setChecked(settings->getExifSetOrientation());
     d->saveCommentsBox->setChecked(settings->getSaveComments());
     d->saveDateTimeBox->setChecked(settings->getSaveDateTime());
@@ -217,6 +224,19 @@
     d->saveCreditsIptcBox->setChecked(settings->getSaveIptcCredits());
 }
 
+bool SetupMetadata::exifAutoRotateAsChanged()
+{
+    return d->ExifAutoRotateAsChanged;
+}
+
+void SetupMetadata::slotExifAutoRotateToggled(bool b)
+{
+    if ( b != d->ExifAutoRotateOrg)
+        d->ExifAutoRotateAsChanged = true;
+    else
+        d->ExifAutoRotateAsChanged = false;
+}
+
 }  // namespace Digikam
 
 #include "setupmetadata.moc"
--- trunk/extragear/graphics/digikam/utilities/setup/setupmetadata.h #578814:578815
@@ -43,13 +43,16 @@
 
     void applySettings();
 
+    bool exifAutoRotateAsChanged();
+
 private:
 
     void readSettings();
 
 private slots:
 
-    void processExiv2URL(const QString& url);
+    void processExiv2URL(const QString&);
+    void slotExifAutoRotateToggled(bool);
 
 private:
 


Reply at: https://bugs.launchpad.net/ubuntu/+source/digikam/+bug/243225/comments/2

------------------------------------------------------------------------
On 2008-12-04T20:37:45+00:00 Andi-clemens wrote:

What about this report? Still valid? For me it runs smooth, but of
course my hardware is newer then the one of the creation date of the
bugreport :-)

Reply at:
https://bugs.launchpad.net/ubuntu/+source/digikam/+bug/243225/comments/4

------------------------------------------------------------------------
On 2008-12-04T21:12:15+00:00 Caulier-gilles-9 wrote:

Same for me. Also, in KDE4, we use multithreading, not a kio-slave for
previewing.

In all case, we will be able to adjust thread priority if necessary.

Marcel,

What do you mean to add a new settings for preview thread priority (like
in Gwenview, if i'm not too wrong)

Gilles Caulier

Reply at:
https://bugs.launchpad.net/ubuntu/+source/digikam/+bug/243225/comments/5

------------------------------------------------------------------------
On 2009-05-24T21:32:06+00:00 Caulier-gilles-9 wrote:

Marcel,

What do you think to use QThread::setPriority()

http://doc.trolltech.com/4.5/qthread.html#setPriority

with LoadSaveThread:

http://lxr.kde.org/source/extragear/graphics/digikam/libs/threadimageio/loadsavethread.h#66

Gilles Caulier

Reply at:
https://bugs.launchpad.net/ubuntu/+source/digikam/+bug/243225/comments/6

------------------------------------------------------------------------
On 2009-05-24T23:14:15+00:00 Marcel-wiesweg wrote:

Yes this is always an option, if we want.
If we are creating thumbnails with the batch tools we can use this of course.
For the thumbnail loading thread for the main icon view, thumbbars or album sidebars we should not decrease priority because loading thumbnails there is directly needed by the user.

Reply at:
https://bugs.launchpad.net/ubuntu/+source/digikam/+bug/243225/comments/7

------------------------------------------------------------------------
On 2012-01-25T13:49:35+00:00 Caulier-gilles-9 wrote:

*** Bug 291436 has been marked as a duplicate of this bug. ***

Reply at:
https://bugs.launchpad.net/ubuntu/+source/digikam/+bug/243225/comments/9

------------------------------------------------------------------------
On 2012-01-25T17:29:30+00:00 Throwaway-w wrote:

Well, this bug is almost seven years old ;).

Reply at:
https://bugs.launchpad.net/ubuntu/+source/digikam/+bug/243225/comments/10

------------------------------------------------------------------------
On 2014-09-08T12:43:03+00:00 Caulier-gilles-9 wrote:

Since multi-core computers are available everywhere, and as we have a
maintenance tool dedicated to recompute all thumbnails, this entry do
not have a sense for me.

In others words, thumbnails processing do not block GUI anymore using
current implementation from git/master...

Gilles Caulier

Reply at:
https://bugs.launchpad.net/ubuntu/+source/digikam/+bug/243225/comments/12


** Changed in: digikam
       Status: Confirmed => Invalid

-- 
You received this bug notification because you are a member of Kubuntu
Bugs, which is subscribed to digikam in Ubuntu.
https://bugs.launchpad.net/bugs/243225

Title:
  digiKam takes up lots of CPU while rebuilding thumbnails, process
  should be given lower priority

To manage notifications about this bug go to:
https://bugs.launchpad.net/digikam/+bug/243225/+subscriptions




More information about the kubuntu-bugs mailing list