Commit: rework edit methods


Subject: Commit: rework edit methods
From: Dom Lachowicz (cinamod@hotmail.com)
Date: Sat Feb 10 2001 - 17:22:44 CST


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:22:46 CST