No need to cross-post to k-c-d IMHO.
Good catch; using foreach on keys() is just a way of making
things slow indeed.
> Infinite loops [...]
Obviously they were not infinite, they were "just"
slow due to creating a QStringList with all the keys in it.
On Monday 21 April 2008, Jarosław Staniek wrote:
>
> - KEntry entry = entryMap[key];
> + KEntry entry = entryMap[ entryMapIt.key()
];
Shouldn't this simply be entryMapIt.value()?
Later on:
> + if (entryMapIt.key().mKey.isNull() &&
!entryMapIt.key().mGroup.isEmpty() &&
> + entryMapIt.key().mGroup !=
"<default>" &&
entryMapIt.key().mGroup != "$Version")
> + groups <<
QString::fromUtf8(entryMapIt.key().mGroup);
So many repetitions of entryMapIt.key() make me wish for a
local variable equal to it
--
David Faure, faure kde.org, sponsored by Trolltech to work on
KDE,
Konqueror (http://www.konqueror.org
), and KOffice (http://www.koffice.org).
_______________________________________________
Kde-optimize mailing list
Kde-optimize kde.org
ht
tps://mail.kde.org/mailman/listinfo/kde-optimize
|