Perspective screen takes time to load

Hi Team,

I’m currently working in Ignition 8.1.48 and have a Perspective screen used for Downtime Reporting.

The screen includes an Equipment Scheduler component, and the downtime events are populated through a transform script. This transform applies background colors to each event based on its downtime category, and the script contains several conditional checks.

The issue I’m facing is performance. When the scheduler loads the default 24‑hour range, the transform script takes noticeably longer to execute (around 10 to 15 sec), which causes the screen to load slowly. However, when I select a shorter time range (such as 12 hours, 8 hours, or 5 hours), the screen loads much faster.

I’m looking for guidance on how to optimize the transform script so the 24‑hour view performs better. Are there recommended best practices for improving transform performance in Perspective, especially when dealing with large datasets and conditional formatting?

Thank you.

It is undoubtedly the while loop on line 400 which is causing your issues....

I'm poking a little fun, but if you want help troubleshooting a script, we're going to need to see the script.

I don't have permission to paste the code here due to restrictions.

I wanted to ask whether moving the code into message handler or a project library function and then calling it from transform script would help improve performance.

Or would it still have the same performance impact?