Subj : Re: Can I have more than one runtime to facilitate multiple threads? To : netscape.public.mozilla.jseng From : David Bradley Date : Tue Jul 01 2003 05:28 pm Chris Davis wrote: > Admittedly, only via process of elimination as we looked at the code. > It was obvious that hundreds of threads were making tons of calls to > JS_ResumeRequest > and JS_SuspendRequest for different contexts all derived from a single > runtime. Not related to your original issue, but something to consider, is there any way to do the work such that you don't need "hundreds" of threads. Generally that's inefficient. If you're truly talking about hundreds, then the context switching between threads will start to be noticeable. Generally you want a few threads to handle work fast and efficiently. Each thread processes a unit of work and then moves onto the next. Without knowing more about the system, hard to say what alternatives there are. Consider, that if each thread's job is to process a JavaScript script. And the system only has 4 cpu's, then having more than 4 or so will only add to overhead, unless those scripts involve I/O. In that case, maybe two times the cpu count is better. A lot hinges on the exact nature of your system how much I/O vs CPU process is being done. David .