qt5base-lts/tests/auto/corelib/kernel/qmetaobjectbuilder
Simon Hausmann 105d10dea9 Fix quadratic behavior in QMetaObjectBuilder when writing string table
QHash::key() is O(n) and we're calling it n times. That can make repeated
calls to the meta object builder very slow, as for example QQmlPropertyMap
when inserting properties repeatedly.

Fortunately this is easy to fix, as the value in the hash map is also the
index, so we can simply iterate over the hash once. With the exception of
the class name, which we have to treat specially to ensure that it is always
the first entry in the string table.

Task-number: QTBUG-32720
Change-Id: Ic954c45c454107feee83216131f601cc69d4c63b
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2013-12-06 18:18:44 +01:00
..
qmetaobjectbuilder.pro don't erroneously claim that gui support is needed 2013-10-16 17:10:15 +02:00
tst_qmetaobjectbuilder.cpp Fix quadratic behavior in QMetaObjectBuilder when writing string table 2013-12-06 18:18:44 +01:00