Hi Johannes, On Wed, Feb 27, 2008 at 05:56:36PM +0100, Johannes Hofmann wrote:
Hello,
below is an improved version of the redraw optimization. It now also covers table based pages - at least to some point.
Yes, in fact it avoids redraws on the test posted in my last email. If I give that test another page, e.g. www.gnu-darwin.org/update.html, it can also avoid _some_ redraws. So the partial optimization seems to be working.
The challenge is to make the already commited optimization work recursively.
Do you want me to commit this new patch, or to keep the already committed one?
Other than I originally thought topLevel is always a Textblock. Table based pages simply consist of a Textblock with a huge Table as child widget. Textblock now needs to avoid redrawing the child area when the table size increases.
AFAIU textblock draws by lines and as the first line is a huge table it requests a redraw of it. I don't know yet why textblock is requesting a redraw; I assume that as the table size changed, textblock gets notified and as it doesn't know better it asks the child widgets for a full redraw. From a distance it looks like a conditionalRedraw() may be the needed call (I don't know well what expose means). I mean if this conditional redraw sees that nothing has changed in the specified area, it can simply return, otherwise redraw.
The redrawing is left to the Table-code, which then can be optimized. Please test carefully and report any anomalies you find.
I haven't found any anomalies. :-) -- Cheers Jorge.-