Hi:
_javascript_ tends to initialize faster, while it takes a little longer to load the Jython interpreter.
At runtime, I doubt that there's a huge difference, and I would personally prefer python over _javascript_ because of its syntax.
The use of scripts in BOY should, however, be limited to very special cases.
Don't add a script to a circle to change its color, but use an LED widget.
Don't add a script to some widget to change the text, instead create a text (or enum) PV and use a Textupdate widget.
Don't use a script to somehow indicate an alarm state, but instead use the "alarm sensitive border" of the widget.
Don't use a script to do anything that should really be done on an IOC.
In short, many of the "BOY Examples" included in CSS that include script examples tend to show gimmicky things that you shouldn't really do in a production environment.
The current implementation of scripts is such that they execute on the user interface thread, because that's currently necessary to update widget properties.
Because of this, each script not just uses CPU, but uses CPU on the UI thread. Even if you have a 128 core computer, when you use many scripts 127 of your cores will be idle while CSS becomes unresponsive because the user interface thread gets bogged down.
Thanks,
Kay
wrote:
Hi Kunal,
I am using v3.2.16 but I am not "authorized" to change the version so easily. Anyway I will try to install v4.x just to see if we don't have anymore these freezes.
I will also try to add more VM RAM and told you if my problems appear again!
I am using Python script instead of JS (more used to write python code), do they consume more CPU/RAM?
Then do you know a way to get the script usage (CPU/RAM) to see if I have one script more thirsty than the others because they are actually quite simple.
Regards,
|