Performance Optimization Findings for Perspective

(Hoping this hasn't been done somewhere else yet on the forum) I would like to share my findings in optimizing performance of some projects that use Perspective. Since I have learned so much from this forum, I felt it was a good way to give back and learn more in optimizing Perspective.

Note that these observations are based on my experience, researching these forums, and videos from Inductive Automation (very good one is "How to Optimize the Performance of Ignition" by Travis Cox, found in the Learning section of the Integrator Account page).

In general, Perspective is a very powerful SCADA platform, but it is very sensitive to performance overhead, which results in long load times and sometimes incomplete loading of tags on screen. Some programming concepts applied to Perspective for faster development may result in heavy overload, so creativity must be used to balance performance with development efficiency.

  1. Embedded Views can be one of the largest contributors of overhead. It is tempting to use a bunch of Embedded Views within Embedded Views for templates, which does allow for faster development, but the deeper the levels go, the longer that component will take to load. Try to keep the level of embedding to 2 levels at most. Using Margins/Padding aspects of Styles can help for any alignment issues that may arise from optimizing a template.

  2. Scripting can present some chances for overhead to creep up. A prime example is overuse of "system.tag.read()", like using a "for" loop to read 400 tags, each time using that function. Instead, use a "for" loop instead to load an array for 1 "system.tag.readBlocking()" or "system.tag.readAsync()" call, then iterate through the results of the search if needed. Less code doesn't always equal less overhead.

  3. In expression property bindings, avoid use of the tag() function. Use curly-braced references (like {tagpath} )instead or indirect tag bindings.

  4. In expression property bindings, use the function "coalesce()" to avoid displaying a null value on screen (ex. coalesce({value},"default") ), since null handling tends to create a bunch of overhead. Just be aware that this may prevent the red Tag Not Found overlays from appearing on that component.

Thanks, and any feedback is greatly welcomed and appreciated.

4 Likes

I use embedded views, running 8.1.31 at the moment on my development server. I would love to find a solution to the red overlays that flash on all the embedded views as they render and tag bindings update. It makes for a clunky looking system. There has to be a better option than opting out of overlays.

Frank

Sensible default values and embedded view's loading mode should usually be enough.
When it's not, opting out of the overlay is not such a bad solution.
Frankly, overlays have their use, but the customer really, really doesn't care about the information they give.
They'd rather have a neat and good looking error popup when they need to know something went wrong.

1 Like