<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><br><div><div>On 23 Apr 2014, at 12:18 am, Chris Double <<a href="mailto:chris.double@double.co.nz">chris.double@double.co.nz</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); position: static; z-index: auto;"><div id="ygrp-mlmsg" style="font-size: 13px; font-family: Arial, helvetica, clean, sans-serif; position: relative;"><div id="ygrp-msg" style="line-height: 1.22em; z-index: 1;"><div id="ygrp-text" style="line-height: 1.22em; font-family: Georgia;"><p style="line-height: 1.22em; margin: 0px 0px 1em;">While low it would be good to remove this if possible. Can the<br style="line-height: 1.22em;">interactive scanner read loop be exited when it's no longer used? I<br style="line-height: 1.22em;">assume the SIGALRM usage is used for the Self scheduler. Perhaps that<br style="line-height: 1.22em;">could be optimized such that it's turned off if all processes are<br style="line-height: 1.22em;">blocked in i/o.<br style="line-height: 1.22em;"></p></div></div></div></div></blockquote><div>I think SIGALRM is also used to step morphic's polling of io. ( through worldMorph runLoop -> worldMorph delayIfNoInputFor: ms )</div><div><br></div><div>The runLoop method comment says: </div><div><br></div><div><div><i>Don't hog the CPU by running too fast when there is</i></div><div><i> no user input, even though there may be ongoing animation or</i></div><div><i> monitoring activities. If we get done before consuming the</i></div><div><i> desired frame time, sleep for the remainder of the time, checking</i></div><div><i> for user inputs at periodic intervals. (A refinement would be</i></div><div><i> to hang on the XEvent queue when there is no animation or</i></div><div><i> other activity happening, but the current scheme uses extremely</i></div><div><i> little CPU time when nothing is happening anyway.)</i></div></div><div><br></div><div>This is probably also the main caller of gettimeofday, which it uses to determine the time for each morphic cycle.</div><div><br></div><div>We can in the longer term do what the comment suggests and not poll for io, but this won't entirely fix our issue because as soon as we have an animation we will be back with SIGALRMs every few milliseconds to drive the animation.</div><div><br></div><div>I'll look to see whether I can find a way to turn off the interactive scanner read loop.</div><div><br></div><div>Russell</div></div></body></html>