qt5base-lts/tests/benchmarks/corelib/io/qdir
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
..
10000 Speed up sorting of dir entries when sorted by date 2012-08-20 16:02:03 +02:00
tree Set the Qt API level to compatibility mode in all tests. 2012-08-01 15:37:46 +02:00
qdir.pro Initial import from the monolithic Qt. 2011-04-27 12:05:43 +02:00