Re: Commit: rework edit methods


Subject: Re: Commit: rework edit methods
From: Martin Sevior (msevior@mccubbin.ph.unimelb.edu.au)
Date: Sat Feb 10 2001 - 17:49:50 CST


HI Dom,
        This is all good stuff but to me the biggest "slowness" issues
are:

1. Scrolling using the arrow keys.
2. Moving windows across the Abi drawing area.
3. Bug 119 (Grey areas while scrolling with the abi screen obscured.)

For 1.

Having used Abi in Windows I can attest that scrolling is MUCH faster
there. I *think* this means that the gtk version of abi should use a
double buffered gdk. So we draw to off-screen memory then dump that to the
screen. That way we save several round trips to the Xserver. We also have
to see if there is some way we don't have to draw the same line 3 times in
order to avoid character dirt.

For 2.
This is really slow because Abi honours every expose event and redraws the
entire screen every time any part of it is uncovered. We can speed this up
enormously by dropping all but the last expose event in the gdk queue.
This would also be speed up with the double buffering I mentioned for 1.

For 3.
This is a matter of synchronizing the scroll events with expose events
redrawing. Abi should not scroll until an expose event redraw is
completed.

Is this the sort of thing your thinking about Dom? Do you think this is a
good way to go?

Cheers

Martin

On Sat, 10 Feb 2001, Dom Lachowicz wrote:

> Hi guys,
>
> The common perception is that AbiWord is slow. I think that is about to
> change for the better. And the better news is that there is a lot of room
> for improvement in the future.
>
> What I did was to alphabetize the edit method strings in ap_EditMethods.cpp
> and instead of running our old linear search through them in
> src/af/ev/xp/ev_EditMethod.cpp, I changed it to a binary search. The results
> are pretty good on my box. There are ~300 edit methods, so a binary search
> is a lot faster than linear. An O(1) Hashtable lookup (after populating the
> HT via a binary search) will be even better. I'll do this next.
>
> I'm also thinking about utilizing a hashtable for O(1) in the XML import
> code as well as the pp_Property code. This should speed up imports on larger
> documents.
>
> Dom
>
> CVS: ----------------------------------------------------------------------
> CVS: Enter Log. Lines beginning with `CVS:' are removed automatically
> CVS:
> CVS: Committing in .
> CVS:
> CVS: Modified Files:
> CVS: src/af/ev/xp/ev_EditMethod.cpp src/wp/ap/xp/ap_EditMethods.cpp
> CVS: ----------------------------------------------------------------------
> _________________________________________________________________
> Get your FREE download of MSN Explorer at http://explorer.msn.com
>
>
>



This archive was generated by hypermail 2b25 : Sat Feb 10 2001 - 17:49:56 CST