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

            Bug ID: 433796
           Summary: kio_http_cache_cleaner is busy waiting
           Product: frameworks-kio
           Version: git master
          Platform: Other
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: HTTP
          Assignee: kio-bugs-n...@kde.org
          Reporter: sit...@kde.org
                CC: kdelibs-b...@kde.org
  Target Milestone: ---

SUMMARY
(this is very poorly researched, but if I don't write it down I'll forget
tomorrow)

kio_http_cache_cleaner has a loop that is basically always true and inside it
waits for 100ms and then either talks to sockets (on the other end I guess is
the http.so) or not. it wraps around and the dance continues.
This effectively is causing entirely pointless CPU load. Not that big a deal on
desktops but in the >0.5% range on plasma mobile. Always. Even when idle. My
poor battery :(

STEPS TO REPRODUCE
1. run the cleaner

OBSERVED RESULT
watch it doing stuff when there is nothing to do (at least I think there isn't)

EXPECTED RESULT
be completely idle unless there's work to be done

ADDITIONAL INFORMATION
This actually was made worse in a change a while ago that reduced the sleep
time from 1s to 100ms because the cleaner wasn't shutting down properly. That
did make me wonder why it is busy looping at all though. The application can
simply run an eventloop and attach to QLocalServer::newConnection (which I
presume will not busy wait) thereby being able to exit somewhat immediately and
having zero need for any amount of while(true){} looping.

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

Reply via email to