https://bugs.kde.org/show_bug.cgi?id=368907

--- Comment #36 from Jan Palus <jan.pa...@gmail.com> ---
Looks like it's still the same, but I'm not really sure whether we are on the
same page -- writeToPipe() is not looping. It is rather called a lot once the
bug is triggered. I've made following small adjustment to its code:

 void DvbLiveViewInternal::writeToPipe()
 {
+  static int notEmptyCnt = 0;
+  static int emptyCnt = 0;
+  if (buffers.isEmpty()) {
+    ++emptyCnt;
+  } else {
+    ++notEmptyCnt;
+  }
+    printf("empty: %d, not empty: %d\n", emptyCnt, notEmptyCnt);
        while (!buffers.isEmpty()) {
                const QByteArray &currentBuffer = buffers.at(0);
                int bytesWritten = int(write(writeFd,
currentBuffer.constData(), currentBuffer.size()));

That's output after 10 seconds "without bug":

empty: 0, not empty: 614

Now after bug is triggered empty counter skyrockets to some crazy value after
10 secs (and continues which is most probably the cause of high CPU usage):

empty: 5053133, not empty: 534

as if notifications about pipe being ready for writing were suddenly coming
very very frequently

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to