Aright I thought I'd better peer at this since it impacts those slow hand held devices (aka iphones). I took a pharo0.1-10284dev09.04.4 and did update I then count bytecodes executed and print that in ioRelinquishProcessorForMicroseconds So this Pharo image takes 51 million byte codes execute before we sleep. Likely this is the point were all the startup: stuff runs to completion. no windows open 51,249,233 bytes codes to idle now we print how many milliseconds we have calculated the image can sleep until the next wakeup due to a pending delay. for example 3 ms, and how many bytecodes were executed since the last time we slept, 2,409. Note the pattern of sleeping 10,2,4,9 ms and bytescodes executed of 442, 2409... 2009-04-20 20:56:39.634 Squeak VM Opt[2523:813] 3 2009-04-20 20:56:39.635 Squeak VM Opt[2523:813] 2409 2009-04-20 20:56:39.646 Squeak VM Opt[2523:813] 10 2009-04-20 20:56:39.647 Squeak VM Opt[2523:813] 426 2009-04-20 20:56:39.650 Squeak VM Opt[2523:813] 2 2009-04-20 20:56:39.651 Squeak VM Opt[2523:813] 422 2009-04-20 20:56:39.658 Squeak VM Opt[2523:813] 5 2009-04-20 20:56:39.659 Squeak VM Opt[2523:813] 2409 2009-04-20 20:56:39.670 Squeak VM Opt[2523:813] 9 2009-04-20 20:56:39.672 Squeak VM Opt[2523:813] 426 2009-04-20 20:56:39.684 Squeak VM Opt[2523:813] 10 2009-04-20 20:56:39.686 Squeak VM Opt[2523:813] 2630 2009-04-20 20:56:39.694 Squeak VM Opt[2523:813] 7 2009-04-20 20:56:39.695 Squeak VM Opt[2523:813] 422 2009-04-20 20:56:39.697 Squeak VM Opt[2523:813] 1 2009-04-20 20:56:39.698 Squeak VM Opt[2523:813] 2409 2009-04-20 20:56:39.711 Squeak VM Opt[2523:813] 10 2009-04-20 20:56:39.715 Squeak VM Opt[2523:813] 426 2009-04-20 20:56:39.729 Squeak VM Opt[2523:813] 10 2009-04-20 20:56:39.730 Squeak VM Opt[2523:813] 2630 But lets go back and look at mmm well an WIkiServer image based on Pharo from Jan or so. no windows open. Well first I do a lot less work (on purpose) at startup time 3,833,928 bytes code to idle, yes only 6% of the work... (ask me where March 09 went... ) but the other change is the morphic polling loop will send me off to slumber land for 20 ms given it's poll freq I think is targeting 50 fps. and the bytecodes executed each cycle is usually 2478 so it's very consistent. In production I turn server mode on and sleep for 500 ms since the UI events are driven by UIKit from screen taps, it's *all* about battery life... 2009-04-20 21:09:54.992 Squeak VM Opt[2624:813] 20 2009-04-20 21:09:54.994 Squeak VM Opt[2624:813] 2478 2009-04-20 21:09:55.020 Squeak VM Opt[2624:813] 20 2009-04-20 21:09:55.021 Squeak VM Opt[2624:813] 2478 2009-04-20 21:09:55.042 Squeak VM Opt[2624:813] 19 2009-04-20 21:09:55.043 Squeak VM Opt[2624:813] 2478 2009-04-20 21:09:55.064 Squeak VM Opt[2624:813] 19 2009-04-20 21:09:55.066 Squeak VM Opt[2624:813] 2478' 2009-04-20 21:09:55.085 Squeak VM Opt[2624:813] 15 2009-04-20 21:09:55.090 Squeak VM Opt[2624:813] 2474 2009-04-20 21:09:55.112 Squeak VM Opt[2624:813] 20 2009-04-20 21:09:55.112 Squeak VM Opt[2624:813] 2736 2009-04-20 21:09:55.137 Squeak VM Opt[2624:813] 19 2009-04-20 21:09:55.138 Squeak VM Opt[2624:813] 2478 2009-04-20 21:09:55.160 Squeak VM Opt[2624:813] 20 2009-04-20 21:09:55.160 Squeak VM Opt[2624:813] 2478 So I think here then in 40 ms we do about 5000 byte code but the new solution does about 8,722 or 75% more work with a more fractured sleep time. A random squeak 3.10 alpha 7082 image with a window or two open gives 7,390,552 byte codes executed to idle. A boring cycle, I note the 3,434 versus the iphone image 2,478, but this 3.10 image has 3 windows up so likely there is a bit more Morphic cycle time being chewed up. 2009-04-20 21:23:30.632 Squeak VM Opt[2683:813] 19 2009-04-20 21:23:30.632 Squeak VM Opt[2683:813] 3434 2009-04-20 21:23:30.653 Squeak VM Opt[2683:813] 20 2009-04-20 21:23:30.654 Squeak VM Opt[2683:813] 3434 2009-04-20 21:23:30.678 Squeak VM Opt[2683:813] 20 2009-04-20 21:23:30.679 Squeak VM Opt[2683:813] 3434 2009-04-20 21:23:30.705 Squeak VM Opt[2683:813] 20 2009-04-20 21:23:30.706 Squeak VM Opt[2683:813] 3434 2009-04-20 21:23:30.728 Squeak VM Opt[2683:813] 20 2009-04-20 21:23:30.728 Squeak VM Opt[2683:813] 3434 2009-04-20 21:23:30.753 Squeak VM Opt[2683:813] 18 2009-04-20 21:23:30.755 Squeak VM Opt[2683:813] 3434 2009-04-20 21:23:30.777 Squeak VM Opt[2683:813] 20 2009-04-20 21:23:30.777 Squeak VM Opt[2683:813] 3434 2009-04-20 21:23:30.798 Squeak VM Opt[2683:813] 19 2009-04-20 21:23:30.799 Squeak VM Opt[2683:813] 3434 2009-04-20 21:23:30.819 Squeak VM Opt[2683:813] 19 2009-04-20 21:23:30.820 Squeak VM Opt[2683:813] 3434 I'd like to see how the PURE EVENT driven event processing works, but not sure how to do that. Also I'm not sure what changes are in progress given the flurry of notes on the mailing list today and this evening. PS For poll driven VMs, couldn't you stick the event polling back in the morphic polling loop and just run one loop process? -- = = = ======================================================================== John M. McIntosh <johnmci@smalltalkconsulting.com> Corporate Smalltalk Consulting Ltd. http://www.smalltalkconsulting.com = = = ========================================================================