From: Martin Sevior (msevior@physics.unimelb.edu.au)
Date: Thu Aug 01 2002 - 02:04:00 EDT
Hi Everyone,
As the author of the isOnScreen() comment, in retrospect I think we
can do much better than looping through the document looking for
isOnScreen().
AbiWord really needs to have all it's blocks formatted all the time. If
we just format the blocks currently on screen we'll get into problems as
Dom's crasher bugs testify. In any case we can do much better by
utilizing a technique similar to our spellchecking code.
What we want are a queue of dirty blocks (or fl_ContainerLayouts) that
get formatted as quickly as possible. This is simply a matter of
creating a queue data structure that is filled whenever the markAsDirty
method is called. We also need to start a background reformatter as soon
as the queue is non empty. This runs in the gtkIdle() time ASAP just
like our spellchecking code.
This way we don't have to scan the entire document to find the blocks
that need formatting and we don't have to wait 0.5 seconds the
background updater to fire. The combination should give us subtantially
improved performance.
In addition the reformatter is not limited to blocks, any
fl_ContainerLayout could be placed in the queue and it's format method
called.
isOnScreen is very useful for the autoUpdating fields and for redrawing
dirty text and I think we should leave the background updater in place
for that.
In any case when HEAD stablizes a bit more, it would be worthwhile
implementing this.
First though, lets get HEAD back into good working order.
Cheers
Martin
This archive was generated by hypermail 2.1.4 : Thu Aug 01 2002 - 01:55:51 EDT