[BUG] why is frame rate in 3.2.5 slower?

John M McIntosh johnmci at smalltalkconsulting.com
Wed Mar 13 17:01:03 UTC 2002


>John,
>
...

>Check the millisecond accuracy. Question 1 is what do you get when run
>something like:
>
>| bag time |
>bag := Bag new.
>time := Time millisecondClockValue.
>1 to: 1000 do:[:i|
>	[Time millisecondClockValue = time] whileTrue.
>	bag add: (Time millisecondClockValue - time).
>	time := Time millisecondClockValue.
>].
>bag sortedCounts

That gives
a SortedCollection(990->1 6->2 2->18 1->12 1->3)

>
>| bag time delay |
>delay := Delay forMilliseconds: 1.
>bag := Bag new.
>1 to: 1000 do:[:i|
>	time := Time millisecondClockValue.
>	delay wait.
>	bag add: (Time millisecondClockValue - time).
>].
>bag sortedCounts

  a SortedCollection(599->16 199->15 191->17 2->18 1->2 1->4 1->7 1->8 
1->9 1->32 1->12 1->13 1->14)

Clusted around 16ms, or 1/60 of a second, very interesting.

I did play with interruptChecksEveryNms and the increment/decrement 
numbers and found nothing made a real difference.

Also I've looking at the Delay logic and noted one interesting 
thing.In EventSensor we do the Delay on the Semaphore. This triggers 
a setup to lookup say 300 ms into the future, then we immediately 
(either because of excess signals) or Mophic asking, fire the 
semaphore and cancel the delay.

Although I wrote some code to use OS timers, that requires refinement 
given delays can be canceled.
-- 
--
===========================================================================
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