qt5base-lts/tests/benchmarks/corelib
Robin Burchell b9ef4a9c30 Speed up sorting of dir entries when sorted by date
QDateTime will attempt to convert unknown types of date to UTC time, which isn't
exactly a fast process. As we don't care about local timezones in the process of
sorting (as this is purely for ordering, not display to the end user), we can
force the dates to use UTC time, avoiding the unnecessary local timezone lookup.

This also adds a benchmark covering this case.

Benchmark results, Qt 5:
 - before: 11, 489ms
 - after: 273ms

Qt 4.8:
 - before: 20, 848ms
 - after: 278ms

Change-Id: I87fa6260e820b5b172d3306ff395dafe767c33ff
Reported-by: Thomas Perl <m@thp.io>
Reviewed-by: Alberto Mardegan <mardy@users.sourceforge.net>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-08-20 16:02:03 +02:00
..
codecs Set the Qt API level to compatibility mode in all tests. 2012-08-01 15:37:46 +02:00
io Speed up sorting of dir entries when sorted by date 2012-08-20 16:02:03 +02:00
json Set the Qt API level to compatibility mode in all tests. 2012-08-01 15:37:46 +02:00
kernel Set the Qt API level to compatibility mode in all tests. 2012-08-01 15:37:46 +02:00
plugin Set the Qt API level to compatibility mode in all tests. 2012-08-01 15:37:46 +02:00
thread Set the Qt API level to compatibility mode in all tests. 2012-08-01 15:37:46 +02:00
tools Set the Qt API level to compatibility mode in all tests. 2012-08-01 15:37:46 +02:00
corelib.pro Import json support from playground/qtbinaryjson 2012-01-24 15:28:20 +01:00