[kcoredirlister] Remove as many url.toString() as possible
ClosedPublic

Authored by jtamate on May 29 2018, 9:13 AM.

Details

Summary

Change itemsInUse, itemsCached and DirectoryDataHash keys from QString to QUrl, avoiding as many QUrl toString() as possible.

Test Plan

It passes the autotests using 20 msecs less.

Diff Detail

Repository
R241 KIO
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
jtamate created this revision.May 29 2018, 9:13 AM
Restricted Application added a project: Frameworks. · View Herald TranscriptMay 29 2018, 9:13 AM
Restricted Application added a subscriber: kde-frameworks-devel. · View Herald Transcript
jtamate requested review of this revision.May 29 2018, 9:13 AM
apol added a subscriber: apol.May 29 2018, 10:56 AM

+1 makes sense

src/core/kcoredirlister.cpp
547

const?

jtamate updated this revision to Diff 35114.May 29 2018, 1:34 PM
jtamate marked an inline comment as done.

const added.

dfaure accepted this revision.May 30 2018, 8:41 AM

Yep, this makes sense these days (back when this was written, QUrl had no hashing function, and my first attempt at writing one was to call qHash(url.toString()) -- how horribly slow!!)

This revision is now accepted and ready to land.May 30 2018, 8:41 AM
This revision was automatically updated to reflect the committed changes.