Revision 867195

Go back to digest for 5th October 2008

Optimization in KDE Base

Germain Garand committed changes in /trunk/KDE/kdelibs/khtml:

make the tokenizer periodically relinquish control, going back to the event loop, for increased responsiveness.

This give stylesheets more opportunities to load and make sure the UI does not freeze.

There are actually two yield delays.
A short one is used at the beginning of parsing, and until the first successful painting has happened, then a longer delay is used (unless the view ceased to paint for a full roundtrip, in which case the delay reverts to short).

This for two reasons:
1 - when painting has happened, it necessarily means all stylesheets have loaded, so a longer delay may be used to make sure the page still completes its load as fast as possible - now that meaningful informations are displayed.

2 - when a view is not interacted with (such as when loaded in a background tab) and not even painted, it must affect as little as possible the responsiveness of pages being actually painted/scrolled.

Thus the need to keep a short delay for the whole parsing of those.

File Changes

Modified 3 files
  • /trunk/KDE/kdelibs/khtml
  •   /khtmlview.cpp
  •   /html/htmltokenizer.cpp
  •   /html/htmltokenizer.h
3 files changed in total