[KPhotoAlbum] Inefficiency in ImageSearchInfo::match()
Robert Krawitz
rlk at alum.mit.edu
Mon Sep 10 01:07:34 BST 2012
While coding up the file name match, I noticed that
ImageSearchInfo::match() doesn't return as soon as it knows that an
image hasn't matched. There's a lot of code of the form:
bool ok = true;
#ifdef HAVE_EXIV2
ok = _exifSearchInfo.matches( info->fileName() );
#endif
...
ok &= ( _label.isEmpty() || info->label().indexOf(_label) != -1 );
...
return ok;
Is there any reason it does this rather than simply return if any of
these tests fail?
--
Robert Krawitz <rlk at alum.mit.edu>
MIT VI-3 1987 - Congratulations MIT Engineers men's hoops Final Four!
Tall Clubs International -- http://www.tall.org/ or 1-888-IM-TALL-2
Member of the League for Programming Freedom -- http://ProgFree.org
Project lead for Gutenprint -- http://gimp-print.sourceforge.net
"Linux doesn't dictate how I work, I dictate how Linux works."
--Eric Crampton
More information about the Kphotoalbum
mailing list