Cut your losses.
Somebody made a big mistake. They did not properly research the climate of available virtual machine technology of the 2003 timeframe. Even back then, we were well aware of Lua's' complete superiority.
JS spidermonkey and JS rhino virtual machines are irreclaimable. Their gluttonous memory consumption and slothlike performance will not be fixed.
Now Max/Msp's great potential -- a potential we looked forward for so long, is squandered. Max is not where it should be. This was so important. It was a critical mistake. Now we're screwed for a long time.
I feel that I'm being very pragmatic about this. I'm not taking a hard-edge aggrandizing stance here. JSUI is simply a failure. It's often easy for the creators, in this case, Cycling.. to 'be holding the handle' but not 'inside the pot.'
Yes, us guys who are inside the pot.. if you heard what actually goes on in our small talks, our unvoiced frustrations. It's just sad. "Well couldn't you do it with JSUI?" , "Ah man..." Yes, there are fleeting moments of innocent hope. They're quickly shattered.
Because JSUI is unusably slow. It destroys your CPU, it stabs your music. There is nothing you can do.
LUA is completely superior.
If we take a look at some respectable language benchmarks of LUA vs JS for a variety of algorithms,
We'll see such things as, oh,
Lua being 8.6 times faster,
Lua being 5.7 times faster,
LuaJit being 30 times faster,
LuaJit being 15 times faster,
Lua is an incredible little VM. It's fast and lightweight. It's easily embeddable with luabind or tolua++. It's sandboxed. It's so tiny that you can just spawn off VM's right and left if you like.
It's not too late.
CUT YOUR LOSSES.
JSUI has only been in Max for a few point releases. People aren't too attached. Max 5 is your chance to say:
Oh, well we made a little booboo.
We really want something that works and uses 2% cpu.