D10256: Don't cache the targetUrlList() result locally, return them from the locally cached m_items. Minor performance improvement as targetUrlList() is now only called (and the list created) when it's requested.
Mark Gaiser
noreply at phabricator.kde.org
Sat Feb 3 00:04:11 UTC 2018
markg created this revision.
markg added a reviewer: dfaure.
Restricted Application added a project: Frameworks.
Restricted Application added a subscriber: Frameworks.
markg requested review of this revision.
REVISION SUMMARY
Small performance improvement of just not caching the targetUrlList() result.
The only use for that list was returning it in KFileItemListProperties::urlList() so we might as well just call m_items.targetUrlList() there and not save it locally.
This came up as redundant list creation when figuring out where all the QUrl objects came from in a drag/drop action in Dolphin.
TEST PLAN
I did not benchmark this, seems rather trivial.
Ran the testcases (most relevant is probablt KFileItemTest), all pass just fine.
REPOSITORY
R241 KIO
BRANCH
KFileItemListProperties_optimizations (branched from master)
REVISION DETAIL
https://phabricator.kde.org/D10256
AFFECTED FILES
src/core/kfileitemlistproperties.cpp
To: markg, dfaure
Cc: #frameworks, michaelh, ngraham
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20180203/1ee84822/attachment.html>
More information about the Kde-frameworks-devel
mailing list