Optimization in Graphics
Adding tags to many images - if writing to file metadata is disabled - is now 10-20x faster
Three optimizations (thanks to callgrind):
- in MetadataHub::write(QString), if no file write will be needed, do not create a DMetadata object (requires disk access -> slow)
- do not update AlbumIconView on every call to slotImageAttributesChanged
- use begin and commitTransaction around loops where many tags are added.
Here, the biggest speed gain comes from the fact that not after every assigned tag the database file is touched, and the AlbumManager KDirWatch triggers a rescan