summaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
authorDavid Faure <david.faure@kdab.com>2017-07-28 11:26:30 +0200
committerDavid Faure <david.faure@kdab.com>2017-08-10 14:50:29 +0000
commit60ad66ce3c32b389d9e2b66722e18717ddfcfd4e (patch)
treed5035d6fbc072be6575f5a42138c48dd260c6da7 /src/plugins
parent74bbb6ba8a402b8a480fca480c94160d5500b466 (diff)
QSqlTableModel: avoid copying QSqlRecord instances
Profiling a large model showed that QSqlRecord was being copied and destroyed from a few places, due to use of QMap<int, ModifiedRow>::value() where ModifiedRow has two QSqlRecord members. This can easily be avoided (in the common case with no modified rows) by using constFind() instead. My testcase (iterating over a model with 126936 rows) went from 1266 ms to 896 ms. Change-Id: I04e98b5573ef24165bf6cff19946e5bedd0fb0ba Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Diffstat (limited to 'src/plugins')
0 files changed, 0 insertions, 0 deletions