Croquet alpha release(s?) - speed & dual CPU machines
John M McIntosh
johnmci at smalltalkconsulting.com
Mon Dec 9 19:06:45 UTC 2002
Thanks for testing on a dual machine.
The mac carbon VM uses pthreads. We create two threads, one to process
UI input events, events are put onto a queue for the VM to read. The
other thread is the VM. Other threads are created by carbon to manage
timer services, carbon/classic disk i/o, event input, etc. Although I
don't have a dual cpu machine to test with I've been fairly paranoid
about keeping the interface between the two threads to a minimum and
have carefully applied pthread mutex as needed to eliminate race
conditions.
So it's not surprising to see only one cpu in use.
VisualWorks allows primitive calls on pthreads, that feature could be
added to Squeak, along with adding a proper fixed memory heap. Tho
having some $$ funding to do that would be good. Perhaps one could
migrate open/GL calls that return no values (other than errors?) to
another thread, however in testing the multiple thread support I ran
into a kernal panic when I attempted to do a post event processing
action on the open/gl primitive, which caused me to restructure how
that event processing is done. So I suspect doing open/gl work outside
of the main UI thread might be a problem.
The mpeg plugin code supports pthreads for decoding, but last time I
tried to work with that I got some weird pthread error on the mac and
since no-one had asked, or had $$ funding I didn't continue. Funding of
course would help acquire a machine to do testing on.
One should note that specialized api calls via FFI or primitives that
require UI input now require a special callback to switch the
call/return to the UI pthread to prevent core dumps.
On Saturday, December 7, 2002, at 03:43 PM, buurtnet wrote:
>
> Hi,
>
> I am totally awed......
>
> I just had a nice guy at Apple give me a shot at running Croquet on a
> dual 1.25Ghz G4 with Max OS X and a 1600*1024 pixel 22'' cinema
> display (the 1920*1600 was unavailable).
> I expanded croquet's window to nearly full screen, and started moving.
> It was so fast, I could hardly move around, I constantly overshot the
> place I wanted to move to. Some adjustable mouse/move preference would
> really help, later perhaps an automatic detection?.
> Although I imported most of the sample objects, ran sound and video, I
> could not slow it down :-)
>
> I assume it is not using the second processor, at least the cpu
> perfomance tool indicated one processor mainly idle.
> I used the carbon 3.4.0Beta2 VM.
>
> What an incredible performance.
>
> It compared favorably to Bryce, a 3d editor.
>
> Thank you Croqueteers, you have really given it your best. And this is
> only (pre)alpha.
>
> Merik
>
>
>
>
--
========================================================================
===
John M. McIntosh <johnmci at smalltalkconsulting.com> 1-800-477-2659
Corporate Smalltalk Consulting Ltd. http://www.smalltalkconsulting.com
========================================================================
===
More information about the Squeak-dev
mailing list
|