Authored by jtamate on Jul 14 2018, 5:37 PM.

Description

Speedup sort

Summary:
Uses a reference to the collator instead of copying and reinitializing it again and again. This is the reason for the speedup.

Changing the implementation from a Functor class to a Lambda removes some boilerplate code, but is not relevant for performance.

This requires a workaround for https://bugreports.qt.io/browse/QTBUG-69361
Just a single comparison to force the clean state of QCollator.

Test Plan:
Sorting in a directory with 82874 images:
[TIME] Sorting: 19883 (before)
[TIME] Sorting: 4198 (after)

kfileitemmodelbenchmark before: .............. Passed 29.36 sec
kfileitemmodelbenchmark after: .............. Passed 20.39 sec

Reviewers: Dolphin, Frameworks, markg, elvisangelaccio, bruns

Reviewed By: Dolphin, markg, elvisangelaccio

Subscribers: elvisangelaccio, apol, bruns, markg, kfm-devel

Tags: Dolphin

Differential Revision: https://phabricator.kde.org/D13814

Details

Committed
jtamateJul 14 2018, 5:37 PM
Reviewer
Dolphin
Differential Revision
D13814: Speedup sort
Parents
R318:ec89af677894: Revert to change the commit message.
Branches
Unknown
Tags
Unknown