I want to fix slow text selection

Leo Savernik l.savernik at aon.at
Thu Sep 18 13:31:14 BST 2003


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello,

In order to fix a double repaint problem on selection text in khtml I 
introduced an "urgent repaint" flag which schedules the repaint to be done 
the next time the event loop is entered. While this fixes the double repaint, 
it has a severe drawback: It slows down text selection so much that it 
becomes intolerable.

I investigated the text selection algorithm, and noticed that first all 
previously selected render objects are marked non-selected, and repainted, 
then all newly selected render objects marked selected, and repainted. These 
repaints are not done immediately but coalesced, and scheduled for a later 
repaint. Repaints are scheduled every 20ms, which is per se sufficient, but 
makes text selection feel slow when moving the mouse quickly over the page. 
Also, by coalescing the events, a much bigger part is repainted as would be 
actually needed.

So would anyone object if I implemented a means that really only repaints 
those render objects whose selection state is changed, and immediately (i. 
e., the next time the event loop is entered, otherwise we get again a double 
repaint problem)?

mfg
	Leo
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE/aaWTj5jssenUYTsRAhULAJ0dxNX4yFrVFsgSyAaHIevIU5rH3wCghTq5
I8DjRMC6fPZKAs3bEUkGlrs=
=xZgg
-----END PGP SIGNATURE-----





More information about the kfm-devel mailing list