[WebKit-devel] branches/KDE/4.4/kdelibs/kio/kio

Dawit Alemayehu adawit at kde.org
Thu Feb 4 21:21:17 CET 2010


On Thursday 04 February 2010 14:02:30 you wrote:
> On Thursday 04 February 2010, Dawit Alemayehu wrote:
> > +    /*
> > +      If startTimerDelayed is true, we still have jobs could not be
> > scheduled +      due to limit enforcements. In order to avoid high CPU
> > usage, however, we +      start the slaveTimer after 1 sec. Otherwise,
> > the above while loop will be +      run in a tight loop and will peg the
> > CPU. See BR# 224857... +    */
> > +    if (startTimerDelayed) {
> > +       kDebug(7006) << "Rescheduling remaining jobs immediately...";
> > +       startTimerDelayed = false;
> > +       slaveTimer.start(0);
> > +    }
> 
> The comment says "after 1 sec" but the code says start(0); what do I miss?

Nothing... I simply forgot to remove the comment. The 1 sec. delay really did 
not make a difference at all in terms of load on the CPU on my system, a 3.2 
GHz Pentium D box. That is because it was not really the main cause of the bug 
; so I figured if there is no impact from firing the timer as soon as the 
current events are done, then we should stick with that instead of introducing 
artificial delays...

If people, specially those with faster machines than I, see still see greater 
loads because it, however, we can put the 1 sec. delay back. I will modify 
either the comment or the code before committing the fix...


More information about the WebKit-devel mailing list