Skip to content
Commit 051dee22 authored by David Faure's avatar David Faure
Browse files

FavoriteCollectionsModel: avoid calling reference() all the time

For some reason I have some non-existing collection IDs in my config
for favorites, so every call to reload() calls insertIfAvailable(dead_id)
which called reference(dead_id), ending up in EntityTreeModelPrivate::indexForCollection
where quite some iteration and linear searching happens.

=> only reference() if we were actually able to select(), i.e.
if the collection was found.
This cuts by half the number of calls to indexForCollection, at least.

REVIEW: 122321
parent aba294f8
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment