Perspective Performance: Strategies for diagnosing slow load times

Hello,

This is more of a general inqury, but our company has on several occations had cases with customers who experience slow loading times in Perspective, the reasons may vary vastly, but I'm doing some research now in order to get a better idea on how to actually debug this. Ofcourse, the project planning and design plays a huge role in this. But when problems arise. What do we do?

What are some good practices here, besides from checking thread dumps, memory allocation, logs from client etc?

For example, could certain Perspective components or specific session property configurations significantly impact loading times?

Are there specific Gateway or project settings that have consistently improved Perspective performance?

Have you noticed significant differences in loading times between thin clients, HMIs, and mobile devices? What factors played a role in resolving those differences?

Have anyone had similar problems with loading times, and how did you debug it to find potential bottlenecks in the GW, and how did you solve it?

Some of the things i have found:

Optimize embedded views:

  • Limit nesting depth: Deeply nested embedded views can significantly impact performance.

Lightweight components: Replace complex components with custom SVGs or simpler alternatives when possible to enhance loading efficiency.

Scripting practices:
Batch Tag Reads: Instead of multiple individual system.tag.read() calls, utilize system.tag.readBlocking() or system.tag.readAsync() with a list of tags to minimize gateway load and improve response times.

I've also read that using runScript can cause performance issues.

Adjust Loading Order: Configuring the loadingOrder property of embedded views appropriately might help?. I've found that the with-parent setting is generally more efficient.

As it seems to be a somewhat common problem, perhaps it would benefit everyone if we could gather as much data on this as possible. I know every case is specific, but I'm interested to learn more and dive deeper into this issue.

Looking forward to hearing your thoughts! :slight_smile:

1 Like

I would just throw in to use tag and indirect tag bindings as much as possible. In our UDTs we have expression tags that figure out some information and that allows us to reference those tags directly in our embedded views which makes the animation load much faster.

I actually learned from ICC this year that runScript is more performant than doing a script transform; however, the real gains come from calling runScript using a method from object class which is beyond my capabilities to understand. There is discussion on the forum about it but TBH I did not follow it.

1 Like

Use Expressions when possible* as they are faster than scripts, but brandon1 is right, using runScript is faster than using a script transform.

*I have yet to try it, but many Expression limitations can be addressed with pturmel's Integration Toolkit module:

5 Likes