XRtn nullEvent timing?

External developers... This forum's for you!

XRtn nullEvent timing?

Postby Dave_Higgins » Mon Oct 25, 2010 9:27 am

While developing/testing/learning XRtn, I have temp printf() log entries scattered about to watch what's going on, and to make sure things are doing what I think they should be doing... As expected, if I use a log entry on a nullEvent, I end up with a bunch of them filling up and scrolling away in the log (so logging of any/all event triggers will omit nullEvent). When included for a few seconds, however, I have a feeling that these nullEvent log entries are being bogged down due to:

  • A) Running in debug mode out of Xcode
  • B) The time it takes for Xcode to print the entry to the log window
So, getting a true reading on the rate of nullEvents in a release version (vs. debug) is not really possible at this point (without coding a hit counter and a way to report that info, and running in non-Xcode launched SC).

So... I'm wondering about how often the nullEvent is sent, I guess based on nothing else going on at any given moment (SC is sending idle messages). Is nullEvent tied together at all with SC's idle message/timing, or maybe tied to SC's internal run loop? Or does it rely on getting it's own null events from outside (an event manager), like the others (while still being routed though SC so SC can deliver it to the XRtn)?

If it is tied to (related to) SC's idle events or internal run loop, do any of the idle/timing related properties effect the rate (things like idleTicks, bg & fg sleepTime/scriptTime)?

Just wondering what kind of activity/settings (other than the XRtn or SC being busy with other code) may effect the rate of, or even stall, a nullEvent stream.
My two favorite teams are Detroit and whoever's playing Chicago.
User avatar
Dave_Higgins
 
Posts: 454
Joined: Mon Jul 07, 2008 9:50 am
Location: Dark Side Of The Moon

Re: XRtn nullEvent timing?

Postby Dan_Kelleher » Mon Oct 25, 2010 9:55 am

My new imagined avatar of you is crystallizing as a Jack London-like rugged trailblazer behind a sled of dogs in the Yukon. We better not lose this SC User Forum. I guess we gotta use it, not to lose it.
User avatar
Dan_Kelleher
 
Posts: 438
Joined: Sun Jul 06, 2008 2:45 pm
Location: Worcester (wouster as in would) Massachusetts USA

Re: XRtn nullEvent timing?

Postby codegreen » Mon Oct 25, 2010 1:57 pm

Dave Higgins wrote:If it is tied to (related to) SC's idle events or internal run loop, do any of the idle/timing related properties effect the rate (things like idleTicks, bg & fg sleepTime/scriptTime)?

Just wondering what kind of activity/settings (other than the XRtn or SC being busy with other code) may effect the rate of, or even stall, a nullEvent stream.

The value in fgSleepTime/bgSleepTime is what is passed as a sleep time to WaitNextEvent, and thus what determines the maximum frequency of xnullEvent when SC isn't receiving other events. For best UI responsiveness SC passes zero as a sleep time in the first call to WNE after non-null events, so in practice they may come more frequently while other events are being processed.

-Mark
codegreen
 
Posts: 1556
Joined: Mon Jul 14, 2008 11:03 pm


Return to Xcode and the Internals Toolbox

Who is online

Users browsing this forum: No registered users and 1 guest

cron