Text Selection Speed

Koos Vriezen koos.vriezen at xs4all.nl
Fri Jun 14 17:08:50 BST 2002


On Fri, 14 Jun 2002, Dirk Mueller wrote:
> On Don, 13 Jun 2002, Matt Newell wrote:
> > understanding to improve the horribly slow text selection algorithm.  I am
> > starting to get a pretty decent understanding of how it works, but I still am
> > not sure where all of the cpu cycles are going.  I just thought that you guys
> > could give me a few pointers on what functions need optimizing, or how to
> > profile khtml to find out for myself.
>
> There is no index about onscreen position -> rendertree object.
>
> Partially the text selection code simply scans through the tree for finding
> the starting and end position, which is really slow. That part needs
> rewriting, but up to now nobody volunteered.

Also, if you uncomment kdDebug in KHTMLView::scheduleRepaint(x,y,w,h), you
see that the whole visual khtml part is repainted while selecting text.

Koos





More information about the kfm-devel mailing list