Mac 3.0 benchmarks
John M McIntosh
johnmci at smalltalkconsulting.com
Thu Feb 8 18:45:22 UTC 2001
>>Similar issue on the mac. The calls to get all the information are
>>more expensive and you run the risk of giving up control to other
>>application hence the poor numbers. In the past polling for mouse
>>location for example used a simple/cheap call but this has been
>>changed because of how the event driven stuff works.
>
>Is that necessary? On the MacOS, for example, the event queue is
>"bypassed" and single/cheap calls are used for tracking feedback in
>what Raskin calls quasimodal events, particularly highlighting and
>outlining types of interactions.
Well for example. Getting the mouse coordinates use to use an OS call
that just returned the mouse location in 2.8. This was changed in 2.9
to code that looks at the current EventSensor information. Now to
populate that information it comes from mouse movement events
generated by the VM. These are generated from
So if you wrote a loop looking at the mouse coordinates, then in 2.8
the number of calls to waitnextevent (an expensive call) would go
down to just a few a second, but you would see 60 mouse movements a
second.
But in 2.9/3.0 the code relies on waitnextevent to return the mouse
location, thus an attempt is made to call it 60x a second. However
the higher performance option attempts to moderate this so if the
mouse doesn't move then the number of actual calls made is fewer.
Now you could change the mouse logic back to
EventSensor methodsFor: primMousePt
"Primitive. Poll the mouse to find out its position. Return a Point. "
<primitive: 90>
^ 0 at 0! !
But you also need a call to get the modifier information from
somewhere, as David N Smith pointed out earlier he want to track the
shift key etc as the mouse moves.
--
--
===========================================================================
John M. McIntosh <johnmci at smalltalkconsulting.com> 1-800-477-2659
Corporate Smalltalk Consulting Ltd. http://www.smalltalkconsulting.com
===========================================================================
Custom Macintosh programming & various Smalltalk dialects
PGP Key: DSS/Diff/46FC3BE6
Fingerprint=B22F 7D67 92B7 5D52 72D7 E94A EE69 2D21 46FC 3BE6
===========================================================================
More information about the Squeak-dev
mailing list
|