summaryrefslogtreecommitdiffstats
path: root/common/genericresource.cpp
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2016-11-22 10:26:30 +0100
committerChristian Mollekopf <chrigi_1@fastmail.fm>2016-11-22 10:26:30 +0100
commitc6af4d6ed59235d8fec52aeddfcd9a65607139ff (patch)
treec32dc712818a9064b03ff4020d369094a24a2e71 /common/genericresource.cpp
parentb6981d94fb5fb12024738b639f9e389dd04578da (diff)
downloadsink-c6af4d6ed59235d8fec52aeddfcd9a65607139ff.tar.gz
sink-c6af4d6ed59235d8fec52aeddfcd9a65607139ff.zip
Avoid unnecessary transactions.
Diffstat (limited to 'common/genericresource.cpp')
-rw-r--r--common/genericresource.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/common/genericresource.cpp b/common/genericresource.cpp
index e36b750..7c4d4ea 100644
--- a/common/genericresource.cpp
+++ b/common/genericresource.cpp
@@ -186,12 +186,13 @@ private slots:
186 { 186 {
187 auto time = QSharedPointer<QTime>::create(); 187 auto time = QSharedPointer<QTime>::create();
188 time->start(); 188 time->start();
189 mPipeline->startTransaction();
190 mPipeline->cleanupRevisions(mLowerBoundRevision); 189 mPipeline->cleanupRevisions(mLowerBoundRevision);
191 mPipeline->commit();
192 SinkTrace() << "Cleanup done." << Log::TraceTime(time->elapsed()); 190 SinkTrace() << "Cleanup done." << Log::TraceTime(time->elapsed());
193 191
194 // Go through all message queues 192 // Go through all message queues
193 if (mCommandQueues.isEmpty()) {
194 return KAsync::null<void>();
195 }
195 auto it = QSharedPointer<QListIterator<MessageQueue *>>::create(mCommandQueues); 196 auto it = QSharedPointer<QListIterator<MessageQueue *>>::create(mCommandQueues);
196 return KAsync::dowhile( 197 return KAsync::dowhile(
197 [it, this]() { 198 [it, this]() {