D29562: KDirectoryContentsCounter: Avoid scanning twice the same dir, prioritise path not in cache
Méven Car
noreply at phabricator.kde.org
Mon May 18 07:43:31 BST 2020
meven planned changes to this revision.
meven marked an inline comment as done.
meven added inline comments.
INLINE COMMENTS
> elvisangelaccio wrote in kdirectorycontentscounter.cpp:186-194
> So if I'm not wrong, this is 2*O(n) + another O(n) for the insert. Previously it was just an amortized O(1) insert.
>
> Are we sure we are not slowing down?
This won't slow anything down : those queues contain filename to stat on, i.e calling syscalls that are 10 times slower than those complexity changes.
I privileged convenience here as it is in fact not performant critical, and lacking better alternative as data structure.
In fact it makes me realize I should use QLinkedList instead of QVector, since I only ever insert and pop.
But again this won't be noticeable in the end.
REPOSITORY
R318 Dolphin
REVISION DETAIL
https://phabricator.kde.org/D29562
To: meven, #dolphin, elvisangelaccio, ngraham
Cc: feverfew, kfm-devel, waitquietly, azyx, nikolaik, pberestov, iasensio, aprcela, fprice, fbampaloukas, alexde, Codezela, meven, spoorun, navarromorales, firef, ngraham, andrebarros, emmanuelp, rdieter, mikesomov
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.kde.org/mailman/private/kfm-devel/attachments/20200518/5ac8cc18/attachment.htm>
More information about the kfm-devel
mailing list