Subject: Re: POW: speed up bulk spell checking
From: Martin Sevior (msevior@mccubbin.ph.unimelb.edu.au)
Date: Mon Aug 27 2001 - 18:52:04 CDT
On Mon, 27 Aug 2001, Ben Mesman wrote:
>
> This is my first post on abi-devel. My employer is allowing me to
> spend some time on opensource (free software) projects. I would like
> to help out on AbiWord.
Hi Ben,
Great to have you help out!
>
> To get a feel of things, I had a look at the POW 2001/9
> (http://www.abisource.com/mailinglists/abiword-dev/01/March/0478.html)
> "Speed up bulk spell checking". On GTK platforms the direction of a
> solution is clear, the specifics may depend on the solution for other
> platforms.
>
> The solution (on GTK platforms): In stead of using the timer
> functions, the idle functions can be used. Putting the spellchecking
> in the idlequeue (gtk_idle_add) will speed up the background spell
> checking of a document of 25 pages from around 2 minutes to 1 second
> (on an Athlon 650MHz, no exact measurement).
>
> The questions:
> 1. Where do I implement this? Should there be a special class UT_Idle,
> or can we modify the UT_Timer to handle both timer-functions and
> idle-functions?
> 2. Who will do the other platforms?
>
These are both tough questions because so far we've explicitly not gone
down the threads path.
One solution I can think of is to put a bool "bDoAsfastAsPossible" with a
default = false in the constructor of the timer functions. Platforms with
a mechanism similar to the gtk_idle function could implement it. If not
implemented, it defaults to the regular timer semantics.
A potential problem.
1. When the spell-check queue is empty, does your code keep polling the
backgroundCheck method every time gtk_idle say it can? Will this be
bad for other methods that might want to use gtk_idle?
(I'm thinking of changing the screen repaints to gtk_idle calls
instead of gtk_timeouts. We might come up with other uses for gtk_idle
calls too)
I'm not saying this is bad. I really don't know what happens when there
are several methods in the gtk_idle queue.
On a totally unrelated topic:
Do you know much about CORBA? We have all sorts of nice hooks in AbiWord
to enable it to be excuted by out-of-process functions. The gnome
platform has a very fast CORBA server, ORBit that would be ideal glue
between abiword and external programs but we have not yet done the work
write the CORBA IDL to integrate AbiWord into this. Is this something you
have expertise/interest in?
We recently received a patch from a Win32 developer to do the Win32
equivalent. Clearly we need to agree on some cross platform base classes
to build on this.
Anyway, welcome Ben. I'm looking forward to seeing some patches :-)
Cheers
Martin
This archive was generated by hypermail 2b25 : Mon Aug 27 2001 - 18:52:14 CDT