diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2016-11-22 10:26:30 +0100 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2016-11-22 10:26:30 +0100 |
commit | c6af4d6ed59235d8fec52aeddfcd9a65607139ff (patch) | |
tree | c32dc712818a9064b03ff4020d369094a24a2e71 /common/genericresource.cpp | |
parent | b6981d94fb5fb12024738b639f9e389dd04578da (diff) | |
download | sink-c6af4d6ed59235d8fec52aeddfcd9a65607139ff.tar.gz sink-c6af4d6ed59235d8fec52aeddfcd9a65607139ff.zip |
Avoid unnecessary transactions.
Diffstat (limited to 'common/genericresource.cpp')
-rw-r--r-- | common/genericresource.cpp | 5 |
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]() { |