qt5base-lts/tests/benchmarks/corelib/io
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
..
qdir Speed up sorting of dir entries when sorted by date 2012-08-20 16:02:03 +02:00
qdiriterator Set the Qt API level to compatibility mode in all tests. 2012-08-01 15:37:46 +02:00
qfile Set the Qt API level to compatibility mode in all tests. 2012-08-01 15:37:46 +02:00
qfileinfo Set the Qt API level to compatibility mode in all tests. 2012-08-01 15:37:46 +02:00
qiodevice Set the Qt API level to compatibility mode in all tests. 2012-08-01 15:37:46 +02:00
qtemporaryfile Set the Qt API level to compatibility mode in all tests. 2012-08-01 15:37:46 +02:00
qurl Set the Qt API level to compatibility mode in all tests. 2012-08-01 15:37:46 +02:00
io.pro tests: make benchmarks compile or disable those which don't compile 2011-05-11 17:04:12 +10:00