[[https://www.revelation.com/|Sign up on the Revelation Software website to have access to the most current content, and to be able to ask questions and get answers from the Revelation community]] ==== %CPU Time Drops to Near Zero (AREV Specific) ==== === At 04 FEB 2004 05:13:44PM Victor Engel wrote: === {{tag>"AREV Specific"}} In investigating a suspected network latency problem, I got sidetracked and noticed something interesting. If I put an OSOPEN statement in a loop, the %Processor Time shown in the System Monitor drops to near zero. I tried experimenting with a few statements and came up with the following short list: 0% OSOPEN 0% OSCLOSE 12% XLATE 60% FLUSH 100% INPUT X,-1 ~2% A loop that does an INPUT X,-1 whenever TIME() changes. 98% A loop that does an INPUT X,-1 whenever DOSTIME() changes. 50-60% A loop that does an INPUT X,-1 whenever DOSTIME() changes by more than 0.1. Can anyone explain the disparity, and particularly why input x,-1 is so expensive compared to others? Can anything useful be made of these findings? Note that I'm NOT using yield. ---- === At 05 FEB 2004 01:53AM The Sprezzatura Group wrote: === To simplify (purely because that's the level of my understanding :-)) the Input,-1 tells Windows that the application is polling the keyboard [i]ergo[/i] is it concerned with user interaction [i]ergo[/i] it should be given priority. There is more to it than this but that's a rough synopsis. Hence the success of CpuPlus at reducing cpu utilisation which works amongst other things by slowing down the rate of keyboard polling. The Sprezzatura Group [i]World Leaders in all things RevSoft[/i] [img]http://www.sprezzatura.com/zz.gif[/img] ---- === At 05 FEB 2004 04:56AM Steve Smith wrote: === Victor, Let me buy you a drink someday and tell you about the 75,000 lines of assembler involved in working out why it is as it is. The entire story makes for enthralling reading. If you're on life support. Steve [[https://www.revelation.com/revweb/oecgi4p.php/O4W_HANDOFF?DESTN=O4W_RUN_FORM&INQID=NONWORKS_READ&SUMMARY=1&KEY=A6161C002929BD3385256E30007A1BB4|View this thread on the forum...]]