Blog

Optimizing Load Time in Ignition Perspective: Notes from ICC Table Talks

Optimizing Load Time in Ignition Perspective: Notes from ICC Table Talks

At this year’s Ignition Community Conference, DMC led a table talk discussing best practices to reduce load times and improve maintainability in Perspective applications.

We were excited to share our expertise and hear from others in the community. Below are some notes and takeaways, organized by difficulty of implementation.

Basic

  • Avoid nesting embedded views more than three layers deep.
    • For reusable library components, create different versions of the same component without nesting base versions.
    • For buttons, consider using a style class to gain consistency instead of an embedded view.
  • Avoid runScript expressions. Call scripts in other ways instead.
  • Always include a range limiter on queries that select from large tables.
  • Reduce repeated usage of heavyweight components like the XY chart.
  • Understand when production environments can be slower than development:
    • HMI/tablet is slower than engineering PC
    • More clients at one time
    • More data in historical records

Intermediate

  • If a data script does not depend on user input, move it to a cyclically running gateway script, and store the result as a tag. This reduces performance load for multiple clients and has the added benefit of being visible from gateway diagnostics scripts.
  • Use Chrome DevTools (Ctrl+Shift+i) to simulate resizing a window or throttling load speeds.
  • Avoid cascading bindings that trigger and retrigger when parameters change: instead, package into a single binding or script.
  • Use expression structures instead of separate single expressions when multiple properties need to retrigger a binding.
  • Manually trigger updates using refreshBinding() instead of setting polling query bindings.
  • Use messages, property change scripts, and events in place of binding script transforms. This benefits visibility and logging capabilities.

Advanced

  • For high numbers of repeated objects, consider a custom lightweight visualization:
  • Experiment with viewing and analyzing the DOM (HTML document object model) using Chrome DevTools. Use Lighthouse to analyze load speeds.

Thanks to everyone that participated in ICC this year! We had a blast and will be back in full force next year for ICC 2024!

Learn more about DMC's Ignition programming expertise and contact us for your next project.

Comments

There are currently no comments, be the first to post one.

Post a comment

Name (required)

Email (required)

CAPTCHA image
Enter the code shown above:

Related Blog Posts