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 /src/gui/kernel/qmime.h | |
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 'src/gui/kernel/qmime.h')
0 files changed, 0 insertions, 0 deletions