Subj : Re: Making SpiderMonkey idleing To : netscape.public.mozilla.jseng From : "Robert Bates" Date : Wed Jan 29 2003 09:32 pm Why not implement a user-defined method that would place the script in an idle mode, like Sleep() or WaitForSingleObject() on Windoze, or sleep() and signal() on Unix? That way it could either cycle on the sleep call or be awakened via an event. Then your script could manage its own idle time without touching core SpiderMonkey code... Just a thought... -Rob "Andreas Podgurski" wrote in message news:b17i2u$ljr1@ripley.netscape.com... > Hi again! > Now, as the multithreading problems have been solved, I came to a point > where I have to modify the Engine a bit. I want to make SpiderMonkey aware > of some idle mechanism, simply giving focus to an idle routine to allow > system message processing. Currently, the script slows down the app > unnecessarly, because its *always* running. I know, it would be better not > to let one script run in an keep alive loop, but it fits my needs more than > other soltutions. Which point would be the best to insert such idle call? I > don't want to do it completly on my own, because the authors of SpiderMonkey > know their code bettet and know the pros and cons of specific ways. Too, > there may still be a hook for such, which I havn't found yet... Especially I > want to prevent the engine to block in the garbage collection, because every > few seconds (I assume its the garbage) the engine resists in a longer run > without returning into the script. Currently, I added an idle call to all my > methods and getter (and setters), but it still suffers from these lags... > > Thanks in advance, > Andreas Podgurski > > .