[BUG]lousy code in Sensor/EventSensor

Tim Rowledge tim at sumeru.stanford.edu
Tue Jul 8 18:28:18 UTC 2003


I've been looking at the code in the sensor related classes after some
new profiling type tools suggested something is horribly wrong with the
behaviour of the io system on Acorns.  Little surprises like discovering
that 65-70% of time is claimed to be spent in EventSensor nextEvent !!
Like noticing that the check for a chaged Display extent never (well
occasionaly every few hours) gets to run and so my window resizing code
looks pointless) and that ioRelinquishProcessor only ever gets to run a
couple of times when a window is closing.

As part of that I had to look at the code for Sensor/EventSensor. Yuck!
Surely it can be made simpler and cleaner?

As a start, can anyone explain why eventQueue is non-nil on a machine
that doesn't use the event input prims yet? This would appear to prevent
the event synthesizing method from ever running , which makes me wonder
how my machine ever got anything done. Nilling it out in an inspector
results in my machine still running but no improvement in the overall
profile. 

tim
--
Tim Rowledge, tim at sumeru.stanford.edu, http://sumeru.stanford.edu/tim
Strange OpCodes: DPC: Double Precision Crash



More information about the Squeak-dev mailing list