diff options
author | Olivier Goffart <ogoffart@trolltech.com> | 2009-12-17 13:09:30 (GMT) |
---|---|---|
committer | Olivier Goffart <ogoffart@trolltech.com> | 2009-12-18 12:05:01 (GMT) |
commit | 37e845d6710ea81aacc33c8ef21308e2cc0cab0d (patch) | |
tree | eee70f2aa0e0703638a244c90d779197379b881e /tests/benchmarks/benchmarks.pro | |
parent | f0ee2077e61fc8014d74bc94afd1907efc9f3272 (diff) | |
download | Qt-37e845d6710ea81aacc33c8ef21308e2cc0cab0d.zip Qt-37e845d6710ea81aacc33c8ef21308e2cc0cab0d.tar.gz Qt-37e845d6710ea81aacc33c8ef21308e2cc0cab0d.tar.bz2 |
Optimize QThreadStorage with QVector
QThreadStorageData::get might be accessed very often. QMap lookup
has proven to be too slow.
We can expect about 20 instances of QThreadStorage in a typical
applications (tested with some KDE applications)
So a QVector is more suited
Note: we now re-use the ids. Which means that if the QThreadStorage
is destroyed before the QThread, and another one is created,
we might get crashes (instead of a warning printed to the console)
Reviewed-by: brad
Diffstat (limited to 'tests/benchmarks/benchmarks.pro')
-rw-r--r-- | tests/benchmarks/benchmarks.pro | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/benchmarks/benchmarks.pro b/tests/benchmarks/benchmarks.pro index bffa009..bb20dcf 100644 --- a/tests/benchmarks/benchmarks.pro +++ b/tests/benchmarks/benchmarks.pro @@ -36,7 +36,8 @@ SUBDIRS = containers-associative \ qstringbuilder \ qstylesheetstyle \ qsvgrenderer \ - qtableview + qtableview \ + qthreadstorage |