[kcoredirlister] Port away from QLinkedList
ClosedPublic

Authored by nicolasfella on Nov 21 2019, 5:33 PM.

Details

Summary

Use QVector instead. Not sure that's the best thing complexity-wise

Test Plan

kcoredirlister benchmark passes

Diff Detail

Repository
R241 KIO
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
nicolasfella created this revision.Nov 21 2019, 5:33 PM
Restricted Application added a project: Frameworks. · View Herald TranscriptNov 21 2019, 5:33 PM
Restricted Application added a subscriber: kde-frameworks-devel. · View Herald Transcript
nicolasfella requested review of this revision.Nov 21 2019, 5:33 PM
dfaure requested changes to this revision.Nov 21 2019, 10:15 PM
dfaure added a subscriber: dfaure.
dfaure added inline comments.
src/core/kcoredirlister.cpp
1547

There can be a lot more items in itemsInUse than there will be in itemsToChange, due to the if() on line 1556. itemsInUse has all currently opened directories, while we care only about one here.
So I'm not sure about the reserve(). At least if we keep the reserve() we should squeeze() at the end.

This revision now requires changes to proceed.Nov 21 2019, 10:15 PM
  • Remove reserver
dfaure accepted this revision.Nov 22 2019, 8:55 AM
This revision is now accepted and ready to land.Nov 22 2019, 8:55 AM
This revision was automatically updated to reflect the committed changes.