[KPhotoAlbum] Speeding up annotation
Robert Krawitz
rlk at alum.mit.edu
Sun Jan 12 03:10:32 GMT 2020
On Sun, 5 Jan 2020 22:33:56 -0500 (EST), Robert Krawitz wrote:
> On Sun, 05 Jan 2020 23:01:13 +0100, Johannes Zarl-Zierl wrote:
>> Am Sonntag, 5. Jänner 2020, 20:23:50 CET schrieb Robert Krawitz:
>>> I found one easy fix in the selection code after the annotations are
>>> changed. It's still very slow and may be worse than linear, but at
>>> least one real problem is cleaned up.
>>
>> Thank you for your work!
>
> AnnotationDialog::Dialog::selectionForMultiSelect() is definitely a
> hot spot. But I'm going to ned to call it a night, I'm afraid...
This has an easy fix, along the lines of what I suggested. The next
problem is here, in saveAndClose:
Q_FOREACH (ListSelect *ls, m_optionList) {
info->addCategoryInfo(ls->category(), ls->itemsOn());
info->removeCategoryInfo(ls->category(), ls->itemsOff());
}
This tries (or at least checks for) every string in the items that are
checked or unchecked. It should only do this for items that were
explicitly added or removed.
--
Robert Krawitz <rlk at alum.mit.edu>
*** MIT Engineers A Proud Tradition http://mitathletics.com ***
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