I've added logic to allow you to alter quartz flush logic and post flush logic ms times. In the info.plist within the application you will find 4 keys which alter this behavior.
SqueakUIFlushPrimaryDeferNMilliseconds = 20
Attempt to accumulate draw events in a 20 ms window. If a draw occurs and the time is greater than 20 ms from the last draw we draw and flush. If the draw is in the 20ms window we draw, and do a CGSync (once) and do not do the flush. The sync should schedule an flush by the carbon event handler within 20ms or so. Setting this value towards 0 will flush on every draw. I will note setting to 16ms causes the hilbert test to draw each pixel, versus clumps of pixels. Altering this value will affect the frame rate of your squeak animation.
SqueakUIFlushSecondaryCheckForPossibleNeedEveryNMilliseconds = 20
Check no faster than 20 ms for possible pending flush events. This reduces CPU overhead. The value of this key has a relationship to the other two keys, but making it smaller might not improve thing. Because of how the checking is done there is no guarantee it will achieve a rate under say 16ms, but it will always occur within N seconds. This value can effect how menus item highlighting is done.
SqueakUIFlushSecondaryCleanupDelayMilliseconds = 25
When N ms occur based on SqueakUIFlushSecondaryCheckForPossibleNeedEveryNMilliseconds and we have a flush pending and the flush has not occurred within this key value of 25ms we force a flush. This value should be more than SqueakUIFlushPrimaryDeferNMilliseconds to avoid conflicts with the draw loop. If for example we have a draw and a draw then no further drawing, the first draw should be flushed, then next cached for upwards of 20-40ms based on SqueakUIFlushSecondaryCheckForPossibleNeedEveryNMilliseconds then we would see it exceeds this key value and cause the flush.
SqueakUIFlushUseHighPercisionClock = true
Use a more expensive ms accurate clock when set to true. If false we use the 16ms based cheap clock. This is set to true to give higher accuracy and does not seem to affect CPU usage based on statistical sampling of production VMs.
Squeakers are welcome to alter these values to obtain best behaviour which might change based on versions of OS-X.
Note: Altering SqueakUIFlushPrimaryDeferNMilliseconds will affect frame rate. Altering SqueakUIFlushSecondaryCheckForPossibleNeedEveryNMilliseconds & SqueakUIFlushSecondaryCleanupDelayMilliseconds will affect menu drawing.
Feedback about these choices is welcome.
This VM can be found at ftp.smalltalkconsulting.com Squeak 3.8.8beta14.app.zip
I've also moved a copy of the sit files to my idisk http://homepage.mac.com/johnmci/FileSharing.html
-- ======================================================================== === John M. McIntosh johnmci@smalltalkconsulting.com 1-800-477-2659 Corporate Smalltalk Consulting Ltd. http://www.smalltalkconsulting.com ======================================================================== ===
On 8/29/05, John M McIntosh johnmci@smalltalkconsulting.com wrote:
I've added logic to allow you to alter quartz flush logic and post flush logic ms times. In the info.plist within the application you will find 4 keys which alter this behavior.
Very clever!
Can the Info.plist file be processed only at application startup? Or can the VM read it again when the display parameters are changed, say? Being able to change these settings on the fly would be a hundred times faster than editing externally and restarting Squeak.
Thanks!
--Tom Phoenix
Right now only at image startup, however we could add primitives to alter them on the fly. I'll consider that.
On 30-Aug-05, at 9:26 AM, Tom Phoenix wrote:
On 8/29/05, John M McIntosh johnmci@smalltalkconsulting.com wrote:
I've added logic to allow you to alter quartz flush logic and post flush logic ms times. In the info.plist within the application you will find 4 keys which alter this behavior.
Very clever!
Can the Info.plist file be processed only at application startup? Or can the VM read it again when the display parameters are changed, say? Being able to change these settings on the fly would be a hundred times faster than editing externally and restarting Squeak.
Thanks!
--Tom Phoenix
-- ======================================================================== === John M. McIntosh johnmci@smalltalkconsulting.com 1-800-477-2659 Corporate Smalltalk Consulting Ltd. http://www.smalltalkconsulting.com ======================================================================== ===
Hello, I'm looking for a bit of feedback from people who might have adjusted the out of the box choices for screen flushing.
Some folks want to ship this VM on school machines so we need to be sure there aren't serious issues with the changes.
On 29-Aug-05, at 7:48 PM, John M McIntosh wrote:
Note: Altering SqueakUIFlushPrimaryDeferNMilliseconds will affect frame rate. Altering SqueakUIFlushSecondaryCheckForPossibleNeedEveryNMilliseconds & SqueakUIFlushSecondaryCleanupDelayMilliseconds will affect menu drawing.
Feedback about these choices is welcome.
This VM can be found at ftp.smalltalkconsulting.com Squeak 3.8.8beta14.app.zip
I've also moved a copy of the sit files to my idisk http://homepage.mac.com/johnmci/FileSharing.html
-- ======================================================================== === John M. McIntosh johnmci@smalltalkconsulting.com 1-800-477-2659 Corporate Smalltalk Consulting Ltd. http://www.smalltalkconsulting.com ======================================================================== ===
On 9/4/05, John M McIntosh johnmci@smalltalkconsulting.com wrote:
Hello, I'm looking for a bit of feedback from people who might have adjusted the out of the box choices for screen flushing.
I tried a few things, but they didn't have any noticeable improvement. So I tried to make things worse. The only change that made any real difference was setting SqueakUIFlushPrimaryDeferNMilliseconds to zero. That made Hilbert draw one step at a time, as expected.
So I can see Hilbert one step at a time, or I can see it appear in little chunks. There doesn't seem to be any other setting on my machine. (In particular, the setting that lets Hilbert appear in large chunks, which is what I have under the older VM, alas.)
Perhaps there is some other action (such as menu drawing or text scrolling) that's more or less responsive under some settings, but I'm not observing it.
I'm running this on a 1.25 GHz PowerBook G4, though. Maybe on slower hardware the differences are more evident.
--Tom Phoenix
squeak-dev@lists.squeakfoundation.org