Opened 11 years ago
Closed 11 years ago
Last modified 11 years ago
#11250 closed Patch - Feature (fixed)
Reduce ThreadedFileWriter thread wakeup
Reported by: | Owned by: | danielk | |
---|---|---|---|
Priority: | minor | Milestone: | 0.27 |
Component: | MythTV - General | Version: | 0.26-fixes |
Severity: | medium | Keywords: | |
Cc: | Ticket locked: | no |
Description
The writer thread will only write in chunks of 'kMinWriteSize' or larger. Currently ThreadedFileWriter::Write() will wake up the writer thread every time, even if the chunk size condition isn't met.
The patch changes ThreadedFileWriter::Write() to only wake up the writer thread is the chunk size condition is met.
This reduces cpu usage by ~9% on a 700MHz Cortex-A9 when recording DVB HD content.
Attachments (1)
Change History (5)
Changed 11 years ago by
Attachment: | mythtv_ThreadedFileWriter_reduce_thread_wakeup.patch added |
---|
comment:1 Changed 11 years ago by
Owner: | set to danielk |
---|---|
Status: | new → accepted |
comment:2 Changed 11 years ago by
Resolution: | → fixed |
---|---|
Status: | accepted → closed |
comment:3 Changed 11 years ago by
Just my 2 cent:
I personally find "(writeBuffers.size() > 1)" is redundant and causes allot of bufferHasData.wakeAll() calls, but I can see that it is hard to prove it is safe.
overall it is still an improvement, thank you.
comment:4 Changed 11 years ago by
Milestone: | unknown → 0.27 |
---|
In 8c4434a25a0c002bbfa971b90083e515a37d3f9c/mythtv: