diff options
| author | Mårten Nordheim <marten.nordheim@qt.io> | 2024-10-22 16:36:45 +0200 |
|---|---|---|
| committer | Mårten Nordheim <marten.nordheim@qt.io> | 2024-10-29 20:46:46 +0200 |
| commit | 1558811a8485f6dcc51a50a2bba0846091ca8bf6 (patch) | |
| tree | fa1f14ff7d4c3e3f1df66064abdecc3d9ceb2638 /src/corelib/kernel/qmetaobject.cpp | |
| parent | bfc76fa39c2bab67ef1857407be539b1f88919e5 (diff) | |
Wrap QModelIndex in QSortFilterProxyModel for hash performance
The qHash implementation for QModelIndex is not very good resulting in
hundreds of collisions in the hash table. This means most lookups in the
table essentially becomes a linear search. This was 'generically' fixed
for Qt 7, but couldn't be fixed for 6 because of the qHash
implementation is inline and would result in different hash values for
the same QModelIndex in different translation units.
To work around this for this particular instance, we wrap the
QModelIndex in a struct that has the fixed qHash implementation.
Fixes: QTBUG-130309
Pick-to: 6.8 6.5
Change-Id: I586fb10cadf73900f3d644f421c37b381224a419
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Diffstat (limited to 'src/corelib/kernel/qmetaobject.cpp')
0 files changed, 0 insertions, 0 deletions
