Subj : Re: Looking for Spidermonkey equivalent of Mozilla/DOM trick... To : Brendan Eich From : Anton van Straaten Date : Wed Nov 26 2003 08:28 pm Brendan Eich wrote: > SpiderMonkey itself knows nothing about event loops, and knows little > about threads, although it can be used from multiple threads > (JS_THREADSAFE). So without tail-recursion elimination, you're not > going to get any kind of "automagic" solution from the core engine. Thanks for the response. Just thought I'd check before rearranging my code. The truth is it'll probably be better with a proper trampoline loop - I notice that setTimeout(f, 0) can add quite some overhead, over a lot of calls. > So, into what kind of event loop or thread architecture are you > embedding SpiderMonkey "without DOM"? If DOM is gone, what's left? > Is the program based on Mozilla? Sorry, should have mentioned, I'm not actually embedding Spidermonkey myself, but I want to be able to run this program under the standalone JSRef shell. That'll provide a command line alternative to the program's DHTML GUI. It does work in the shell right now, but it's seriously limited by stack depth. I should be putting this code up in the next week or so - I'll post about it on jseng. Anton .