diff options
author | David Faure <david.faure@kdab.com> | 2014-10-22 10:04:01 +0200 |
---|---|---|
committer | David Faure <david.faure@kdab.com> | 2014-10-31 10:38:23 +0100 |
commit | 3de0f442b5857915f26be6600bc8e54d1af08208 (patch) | |
tree | 2a1c2c7e4c2bc219fa5303b49a92eaa4368bd102 /tests/benchmarks | |
parent | 6700fb0bf0bc1be7346c8184b7c112c574ba6515 (diff) |
QIdentityProxyModel: remove slow bounds-checking, for more performance
If we're called out of bounds, sourceModel()->index() will take care of
returning an invalid model index anyway. So calling rowCount+columnCount
every time index() is called can be avoided. These calls can be particularly
slow when sitting on top of a stack of proxymodels. And index() itself is called
very often, i.e. when a proxymodel on top of us is used by a delegate
which calls data() for many different roles.
Change-Id: I45ad6249ea6c6c719a28d25a03b6e5003f4e49ee
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
Diffstat (limited to 'tests/benchmarks')
0 files changed, 0 insertions, 0 deletions