[REBOL] RATE experiment...
From: cyphre::volny::cz at: 29-Aug-2001 16:16
Hi List,
I have been experimenting with 'rate parameter of face and found some
strange behaviour...
Try to run folowing code:
-----------snip--------------
view layout [
b: box blue with [
feel: make feel [
rate: 30
engage: func [f a e][
either not tog/state [
if e/type = 'time [
i: i + 1
if s < now/time [s: now/time f/text: reform ["rate: " i " fps"] show f
i: 0]
]
][
i: i + 1
if s < now/time [s: now/time f/text: reform ["rate: " i " fps"] show f
i: 0]
]
]
]
]
across
vtext "rate set to: "
r: vtext 30x20 "0"
return
sl: slider 100x16 [r/text: to-string b/rate: (to-integer face/data * 40) s:
now/time i: 0 show [r b]]
return
tog: toggle 200x20 "now tracking only time events" "now tracking all
events"
]
------------snip------------------
leave it in "tracking only time events" mode and try to set bottom slider to
different positions and watch what is blue box showing. I've tested under
WIN98 on [Celeron--530Mhz] and found that I cannot get over approx 20fps which
is IMO a little bit slow for such simple operation as showing simple text
face. Also when I set rate between 10-17 the real face refresh was still
around 9-10fps...strange??(but maybe my rate-meter code is not so much
exact...)
Now try to toggle to "tracking all events" mode and try to "drag-like" blue
face and keep moving over with pressed LMB. You will notice huge increasing
the rate (up to 60fps on my machine)....it seems like 'show is called with
every event going thru the face. I'm just wondering why I cannot go over
20fps with time events tracking only even it seems like I hve enough "power"
to achieve 60fps in the second mode?
I would appreciate nay comments, explanations or another experience on
different configurations/systems...
regards,
Cyphre