Mini-Conference Proposal: sugar performance

Gary C Martin gary at garycmartin.com
Sun Mar 23 14:01:58 EDT 2008


Hi Tomeu,

On 23 Mar 2008, at 17:13, Tomeu Vizoso wrote:

> - Move datastore and sharing initialization later after the UI has
> been launched, the user won't be able to start working sooner, but
> will be given a better idea of the launching process (will feel
> faster).

I think we spoke a little about this a few weeks back. What happens if  
the UI needs access to datastore, metadata, or sharing details to  
actually present it's UI for the task at hand? For example, launching  
Speak activity from the Journal requires the face to be drawn with  
preference data from the datastore (number of eyes, eye shape, mouth  
shape, spoken language).

Currently most UI layout is just done in the activities main __init__  
and this is already a limitation if the activity needs datastore  
information before drawing the UI. If the activity is started from  
Journal, then a read_file() method can catch the data availability and  
draw the required UI. If the activity is started from fresh then there  
is  nothing other than the __init__ call. With Moon activity, I've had  
to put in an (arbitrary 50ms) event timer in my __init__ so I do not  
draw the UI right away. Then, if read_file() is triggered, I remove  
the event timer and draw the UI for the data that just became  
available. If read_file() is not called, or not called within my event  
timer delay, then the timer eventually fires and triggers a default UI  
draw. Not an idea solution.

It would be useful to have 3 methods called during activity set-up:

	__init__ # set-up what you can

then either:

	 read_file() # for when there is journal data

xor:

	clean_start() # for when there is no journal data

Gary

BTW: I've not implemented any form of sharing yet (I have no way to  
reliably test), so don't have any input about shared activity start- 
ups. I do remember seeing at least one ticket kicking about for a  
Write bug, where you could start typing in a shared document before  
the shared data had actually arrived from the other XO, messing up  
document state somewhat...




More information about the Devel mailing list