┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/views
diff options
context:
space:
mode:
authorFrank Reininghaus <[email protected]>2015-05-07 21:09:01 +0100
committerFrank Reininghaus <[email protected]>2015-05-07 22:14:00 +0200
commite69d3489751ea15c0477fe1d41fcc252c775d377 (patch)
treec8082bdf7dc464cd5b6c84ddc26f6cfad16682f4 /src/views
parent5bde333ca7e9c285f1101bac0434fb4e60b6d4d5 (diff)
Fix KFileItemModel performance regression
Commit 119f7a3f fixed a crash that was caused by the porting of the natural sorting code to QCollator. QCollator is not thread-safe, so every thread needs its own instance. However, that commit made every recursive call in the sorting code create a new deep-copied QCollator instance, which is quite expensive and thus made inserting any items into the model very slow (this could also be seen in the KFileItemModel benchmark). This commit avoids unnecessary QCollator copying by forcing all sorting functions which are called in the same thread to pass the 'lessThan' object by const reference, such that no unnecessary copying of that object, including a deep copy of the QCollator, takes place. REVIEW: 123620
Diffstat (limited to 'src/views')
0 files changed, 0 insertions, 0 deletions