D10288: [WIP, RFC] A different approach to reducing KFileItem copies

David Faure noreply at phabricator.kde.org
Sun Feb 4 13:50:02 GMT 2018


dfaure added a comment.


  When you measure the number of calls to the copy constructor, is that with a Debug build or a RelWithDebInfo build? The latter optimizes out a large number of calls to the copy ctor, so counting this on a debug build is a rather wrong measure.

INLINE COMMENTS

> dolphinview.cpp:1430
> -    for (int i = 0; i < itemCount; ++i) {
> -        const KFileItem item = m_model->fileItem(i);
> -        if (item.isDir()) {

This could just be const KFileItem &item = to avoid copying, no ?
 (though maybe there's one copy inside the method implementation)

REPOSITORY
  R318 Dolphin

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

To: markg, dfaure
Cc: ngraham, #dolphin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.kde.org/mailman/private/kfm-devel/attachments/20180204/972c43b7/attachment.htm>


More information about the kfm-devel mailing list