dfaure requested changes to this revision. dfaure added a comment. This revision now requires changes to proceed.
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). INLINE COMMENTS > kcoredirlister.cpp:1934 > // Make list of deleted items (for emitting) > - KFileItemList deletedItems; > + KFileItemListV2 deletedItems; > QHashIterator<QString, KFileItem*> kit(itemsToDelete); The actual performance fix would be to add deletedItems.reserve(itemsToDelete.size()) here... > kcoredirlister.cpp:2576 > it.next(); > - emit m_parent->itemsAdded(it.key(), it.value()); > - emit m_parent->newItems(it.value()); // compat > + const KFileItemList list = toKFileItemList(it.value()); > + emit m_parent->itemsAdded(it.key(), list); right, so this patch in fact makes things slower. > kcoredirlister.cpp:2594 > if (tmpRemove) { > - emit m_parent->itemsDeleted(*tmpRemove); > + emit m_parent->itemsDeleted(toKFileItemList(*tmpRemove)); > delete tmpRemove; slower REPOSITORY R241 KIO REVISION DETAIL https://phabricator.kde.org/D10380 To: markg, dfaure Cc: #frameworks, michaelh, ngraham