callback strangeness?

Rob Gayvert rtg at rochester.rr.com
Tue Mar 15 21:39:15 UTC 2005


Cees de Groot wrote:

> On Tue, 15 Mar 2005 14:53:52 -0500, Rob Gayvert 
> <rtg at rochester.rr.com>  wrote:
>
>> With a virtual list control, #onGetItemImage: get called once for 
>> each  item in the list each time that the list is displayed, so if 
>> the  callback takes a significant amount of time this is going to 
>> make the  GUI very unresponsive. I think you'd be much better off 
>> with some kind  of asynchronous update to the list.
>
> Yup. However, this is just the single list where network-wide search  
> results are displayed. Furthermore, in this particular case, the 
> callback  took time because the network didn't return any results (it 
> tries for 2  seconds) which indicates some data inconsistencies (IOW: 
> shouldn't happen  in Real Life, at least not regularly).
>
> But performance/responsiveness aside, any idea what causes the 
> crash&burn?

I suspect it's the same deal as with more innocuous glitches (like 
wxGetResult returning a nil value) amplified by the long delay. The 
current callback scheme is far too dependent on process priorities and 
timing. When it crashes like this, it's very difficult to trace what has 
gone wrong. If I can't resolve it soon, I'm going to look at running the 
interpreter in a separate thread.




More information about the Wxsqueak mailing list