summaryrefslogtreecommitdiffstats
path: root/src/core/qchangearbiter.cpp
diff options
context:
space:
mode:
authorMilian Wolff <milian.wolff@kdab.com>2014-11-05 14:24:35 +0100
committerSean Harmer <sean.harmer@kdab.com>2014-11-05 15:01:04 +0100
commitbdb708eb71226c95cf70e17363eecd8fb42d577d (patch)
tree27ee9f52aba638bbcd79c4b45532a432c5c2d280 /src/core/qchangearbiter.cpp
parent5a161175084ddbcd1a7fbed244793239a16fe095 (diff)
Optimize: use std::vector instead of QVector for the change queues.
Note that QVector::clear() frees memory, as does resize(0) now apparently. This triggers repeated allocations after we distributed the changes. Using std::vector instead, we can reuse the memory leading to a noticeable performance improvement. Change-Id: Ib08795a7ba3f893c13dad29f50641e4e2dc924e4 Reviewed-by: Paul Lemire <paul.lemire@kdab.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Diffstat (limited to 'src/core/qchangearbiter.cpp')
-rw-r--r--src/core/qchangearbiter.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/qchangearbiter.cpp b/src/core/qchangearbiter.cpp
index 55c4c070a..f71cf090d 100644
--- a/src/core/qchangearbiter.cpp
+++ b/src/core/qchangearbiter.cpp
@@ -256,7 +256,7 @@ void QChangeArbiter::sceneChangeEvent(const QSceneChangePtr &e)
// Add the change to the thread local storage queue - no locking required => yay!
ChangeQueue *localChangeQueue = m_tlsChangeQueue.localData();
- localChangeQueue->append(e);
+ localChangeQueue->push_back(e);
// qCDebug(ChangeArbiter) << "Change queue for thread" << QThread::currentThread() << "now contains" << localChangeQueue->count() << "items";
}