Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Reduce ThreadedFileWriter wakeups.

Fixes #11250. If there isn't enough data to actually bother writing
it to disk don't wake up the writer thread.
  • Loading branch information...
commit 8c4434a25a0c002bbfa971b90083e515a37d3f9c 1 parent 6912383
@daniel-kristjansson daniel-kristjansson authored
Showing with 4 additions and 1 deletion.
  1. +4 −1 mythtv/libs/libmythtv/ThreadedFileWriter.cpp
View
5 mythtv/libs/libmythtv/ThreadedFileWriter.cpp
@@ -248,7 +248,10 @@ uint ThreadedFileWriter::Write(const void *data, uint count)
writeBuffers.push_back(buf);
- bufferHasData.wakeAll();
+ if ((writeBuffers.size() > 1) || (buf->data.size() >= kMinWriteSize))
+ {
+ bufferHasData.wakeAll();
+ }
LOG(VB_FILE, LOG_DEBUG, LOC + QString("Write(*, %1) total %2 cnt %3")
.arg(count,4).arg(totalBufferUse).arg(writeBuffers.size()));
Please sign in to comment.
Something went wrong with that request. Please try again.