I have many running scripts that come and go and I would like to track them down. I have searched for every instance of system.util.invokeAsync and have given the calls descriptions, but I still have these appear:
None of these scripts stay running, but I would like to trace their origin to reduce the number of times they are invoked and their impact, if practical. They are also almost certainly originating from a tag or Perspective change script.
Is there anything other that system.util.invokeAsync that could spawn a thread like this? I just don’t know where to search next to reduce the load caused by these.
Currently, Perspective works with an unbound, caching thread pool. If you end up with many sessions or scripts running concurrently, you could quickly create a lot of threads, which will exist for a certain TTL then terminate.
We have a feature request to allow you to contribute description information when creating script transforms to make situations like this easier to diagnose.
Just curious - what are you using queryStatus for in a transform?
If you can refactor to plain alarm status tables, there’s a significant optimization that’s landing in 8.1.12, where any tables querying at the same time will automatically reuse from a cache, instead of pulling their own data per session.
Fwiw, I use tags as well. I have two udts, one which has one instance only which has a tag that calls queryStatus at a regular interval 2s to get all alarms and write the info into a library variable. The other udt is instantiated anywhere you want a folder summary and has tags in it that process the library variable and summarise them, like active unack, priorities, etc