D28521: Use more UDSEntry::reserve() calls to avoid reallocs on multiple inserts

Aleix Pol Gonzalez noreply at phabricator.kde.org
Fri Apr 3 14:05:48 BST 2020


apol added a comment.


  In D28521#640685 <https://phabricator.kde.org/D28521#640685>, @kossebau wrote:
  
  > @apol So okay if I land this one for now?
  >  The initlist approach does not cover all cases anyway, and until that one is reviewed by enough experienced developers (e.g. who can tell if alignment of data works as hoped), this here should save resources across the globe already :) (even more as std::vector does not know about `Q_DECLARE_TYPEINFO(KIO::UDSEntry, Q_MOVABLE_TYPE);` and on each resize does a full copy of all items.
  
  
  sure, go for it.

REPOSITORY
  R241 KIO

REVISION DETAIL
  https://phabricator.kde.org/D28521

To: kossebau, #frameworks, dfaure
Cc: apol, ahmadsamir, kde-frameworks-devel, LeGast00n, cblack, GB_2, michaelh, ngraham, bruns
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20200403/4c468f90/attachment.html>


More information about the Kde-frameworks-devel mailing list