1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 <2015> 2016 2017 2018 2019 2020 2021 2022 2023 2024 | Index | 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 <2015> 2016 2017 2018 2019 2020 2021 2022 2023 2024 |
<== Date ==> | <== Thread ==> |
---|
Subject: | Re: CSS performance |
From: | "Kasemir, Kay" <[email protected]> |
To: | Benoit <[email protected]> |
Cc: | Marcio Alexandre Barbosa <[email protected]>, EPICS mailing list <[email protected]> |
Date: | Mon, 29 Jun 2015 15:12:02 +0000 |
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
On Jun 29, 2015, at 10:12 AM, Benoit <[email protected]>
wrote:
|