Skip to content
  • Jaime Torres Amate's avatar
    Speedup sort · 765cc968
    Jaime Torres Amate authored
    Summary:
    Use a lambda function to use only one QCollator initialized only once.
    
    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
    765cc968