Bug 104032

Summary: Renaming images takes a lot memory and time
Product: [Applications] digikam Reporter: Carsten Niehaus <cniehaus>
Component: AdvancedRename-dialogAssignee: Digikam Developers <digikam-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: caulier.gilles
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Gentoo Packages   
OS: Linux   
Latest Commit: Version Fixed In: 0.1.0

Description Carsten Niehaus 2005-04-16 19:43:37 UTC
Version:           0.7.2 (using KDE KDE 3.3.2)
Installed from:    Gentoo Packages
Compiler:          gcc 3.3.5 
OS:                Linux

If you rename pictures the script isn't simply using the "mv" command or similar tools. It seems to copy the whole pictures into memory, renaming them and rewriting them on the disk.
I tried to rename about 300 pictures on a 600 mHz-PC, it took almost 30 minutes to finish and made the PC unusable for that time.
If I had used a Ruby (or similar) script it would have taken less then 5 seconds. I tried KRename and it performed also very fast.

I don't know if this is related: the newly named files all had a wrong date (1.1.1960).
Comment 1 Tom Albers 2005-08-15 22:17:23 UTC
SVN commit 449513 by toma:

Owen Hirst <n8rider@sbcglobal.net>  has provided a patch for KIPI Rename Images (part of the BatchProcesses Plugin). 

kipi part:
* Complete rewrite
* Use rename instead of copy
* Allow formatting of date string

digikam part:
* fixes the time and date adjustment not working 
* Update database entry when a file is renamed by a KIPI Plugin
* make slideshow available right after digikams start

This fixes the following bugs:
BUGS:110391,110659,110698,110575,99895,104032,105727,110508,104511

great work!



 M  +16 -0     graphics/digikam/digikam/albumdb.cpp  
 M  +8 -0      graphics/digikam/digikam/albumdb.h  
 M  +2 -0      graphics/digikam/digikam/digikamapp.cpp  
 M  +24 -10    graphics/digikam/digikam/kipiinterface.cpp  
 M  +1 -0      graphics/digikam/digikam/kipiinterface.h  
 _M            libs/kipi-plugins/batchprocessimages (directory)  
 M  +3 -2      libs/kipi-plugins/batchprocessimages/Makefile.am  
 M  +22 -1     libs/kipi-plugins/batchprocessimages/batchprocessimagesitem.cpp  
 M  +7 -0      libs/kipi-plugins/batchprocessimages/batchprocessimagesitem.h  
 M  +3 -3      libs/kipi-plugins/batchprocessimages/plugin_batchprocessimages.cpp  
 A             libs/kipi-plugins/batchprocessimages/renameimagesbase.ui  
 M  +45 -663   libs/kipi-plugins/batchprocessimages/renameimagesdialog.cpp  
 M  +44 -79    libs/kipi-plugins/batchprocessimages/renameimagesdialog.h  
 A             libs/kipi-plugins/batchprocessimages/renameimageswidget.cpp   [License: GPL]
 A             libs/kipi-plugins/batchprocessimages/renameimageswidget.h   [License: GPL]