Text Selection Speed

Dirk Mueller mueller at kde.org
Sun Jun 23 19:48:57 BST 2002


On Sam, 22 Jun 2002, Koos Vriezen wrote:

> Attached a patch that contains my two previous patches, only repaint the
> selected object and the re-scheduling changes, with some improvements.

- what you hacked together with QValueList<QRect> is handled MUCH more 
  efficiently in QRegion. Please use that instead.

- DocumentImpl is not part of the public interface. there is no need
  to add a Private class to it. 

> It also adds 'cachedInnerNode' to DocumentImpl.

which is broken. 

> 'DocumentImpl::prepareMouseEvent' first looks if the mouse is still in
> this object, before rescanning the rendering tree. This saves a lot of CPU
> cycles when moving the mouse above khtml part.

And doesn't work. while the mouse might be still inside the previous 
"innernode", there might be a new "more inner" innernode now. Your caching 
breaks for this case. 

Believe me, if it had been that simple it would be already implemented ;-)

> There is no reference counting in Render*, so I'm not 100% sure this
> cached node is always valid.

Yes, additional headache. 


Dirk




More information about the kfm-devel mailing list