[KPhotoAlbum] Patch to improve performance of new image scan

Shawn Willden shawn-kimdaba at willden.org
Sat Apr 14 07:55:39 BST 2007

On Wednesday 11 April 2007 05:16, Robert L Krawitz wrote:
> This is a patch I posted a while back to improve performance of the
> new image scan.  It improves performance by not attempting to stat()
> files unless we have reason to be interested in them in the first
> place (the QDir class winds up stat'ing every file in the directory,
> which is quite expensive since it requires a lot of disk accesses).

One minor suggestion:  It would probably be a good idea to move the code that 
determines if the file is RAW or "standard" to a couple of functions in the 
Utilities class, like the "isVideo()" method.  I'd probably also use a 
StringSet for faster lookups like the isVideo() method does, but that 
probably doesn't matter in this case, since runtime will be dominated by I/O.


More information about the Kphotoalbum mailing list