Re: Java 200 times faster, almost as easy to use, so why Javascript ?

Forums > Javascript > Java 200 times faster, almost as easy to use, so why Javascript ?
Aug 20 2012 | 4:26 pm

I felt it’s been a long time since i didn’t complain about javascript :-)
It seems to me that javascript object in max6 are about 10 times slower to load than in max5…

It’s less than a second to reload 200 objects of my .js in Max5, and between 5 and 10 seconds (sometimes 15) in max6. …which probably means sometimes 80 milliseconds to load one single .js!
Try the simple patch below in max5, then in max6: There are 200 little abstractions each containing a very simple js object:
1 – delete them all,
2 – then do command-z…

We are redesigning simpler our modular instrument structure in java and max (with full automation, powerful presets and sequencing system*), and each of our hundreds of parameters are connected to a little abstraction to connect numberboxes and sliders to a main java mxj object**. We need to built a dynamic "path" for send and receive objects and java would have been fine and super fast for that, but unfortunately, in java we can’t access to the "maxbox" containing the patcher :-|
So we though about using javascript for that but that max6 reload slowness doesn’t sounds good.
So we finally wrote a c-external for our little abstractions to access to this "maxbox" stuff, which will be fine.


** I though about using pattr, but we prefer our "little-abstractions" system for several little reasons, two of them being that you cannot directly dump value changes in one place from hundreds of scripting-named objects without also writing a c-external for that, and that pattr have the reputation to be slower that [send] and [receive].

Subscribe to the Cycling ’74 Weekly Newsletter

Let us tell you about notable Max projects, obscure facts, and creative media artists of all kinds.

* indicates required