This refactors KFileItemList uses to KFileItemListV2 where possible.
In terms of performance there isn't any change really. I did meassure it with callgrind but it seems roughtly the same when running Dolphin with it. If anything it's marginally faster, but that could just be the specific case.
Another folder might be the same.
Details
- Reviewers
dfaure
Test Dolphin, run the tests. The relevant ones (kdirmodeltest and kfileitemtest) seem to pass just fine.
Diff Detail
- Repository
- R241 KIO
- Branch
- refactor_dirlistercache
- Lint
No Linters Available - Unit
No Unit Test Coverage
See, I almost asked in the previous commit "are you sure that this is going to be faster?", and this patch answers it. It's not.
Which is logical, since you are not able to benefit from move semantics anywhere in this patch (so it's just appending to a QList vs appending to a vector -- same performance), while OTOH you have to introduce slow conversion functions from vector to list.
-2, this isn't going to help.
At most, make that a KF6 TODO that KFileItemList should inherit std::vector (ideally with an #if version check for the kio version, not just a comment, so that we don't forget).
src/core/kcoredirlister.cpp | ||
---|---|---|
1934 | The actual performance fix would be to add deletedItems.reserve(itemsToDelete.size()) here... | |
2576 | right, so this patch in fact makes things slower. | |
2594 | slower |