The OLPC develop activity requirements.

From: Martin Sevior <msevior_at_physics.unimelb.edu.au>
Date: Sat Mar 03 2007 - 02:32:01 CET

Hi everyone,
            The OLPC develop activity is considering using abiword as
it's code editor.

They have a requirement to save every 20 keystrokes or 20 seconds. Their
first thought would be to have an addition GtkSignal emitted by abiword
on every keystroke, then could count these and save as they need.

However to implement this means broadcasting a "notify()" to our view
listeners on every keystroke. This is an expensive operation on abiword
proper as it means every menu item and toolbar item in abiword must
interrogate the document state to determine if it should be "pressed in"
or set sensitive/insensitive.

Right now these notifications are sensibly cached so that the broadcast
only occurs if the state of the document actually changes.

We have a mechanism to bypass this for special occurrences but this is
rarely used.

I have some uncommitted code that detects if the abiwidget is running.
If so, this caching mechanism is bypassed allowing the GtkSignal to be
broadcast on every keystroke as requested. My thinking is that this is
not as expensive for abiwidget since it is used with far fewer menu and
toolbar items.

The change to abicore is only about 20 LOC at this point. What do people
think about this? Are there other ideas to achieve the same outcome?

Cheers

Martin
Received on Sat Mar 3 02:40:56 2007

This archive was generated by hypermail 2.1.8 : Sat Mar 03 2007 - 02:40:56 CET