Hello Everyone,
Good day.
We have this right-click functionality in Vision. The pop-up sometimes takes time to appear and it outputs the NonResponsiveEDT json file. I have trouble interpreting it to solve the problem and don't know where to start looking.
Can someone guide me how to review these files? I would really appreciate for the help.
You have code scattered in your UI events that are performing complex operations, including callouts to gateway RPC.
I didn't look at them all them all, but one was stuck in a Vision windowOpened event (line 48), and the second was stuck in a mouseReleased event (at shared.graph_functions:163) waiting on some callout to tag information.
All UI events, especially in Vision, need to be programmed with UI delays in mind--nothing should take more than 100ms. To achieve this, avoid any network-dependent operation. Such operations should use bindings that don't impact the UI thread. (Named query bindings and tag bindings, in particular.) Then the scripts can just access the target of the bindings, for no delay.
Other operations that have no asynchronous binding should be delegated to an asynchronous thread that doesn't touch the UI itself.
An exception would be a "save" or "commit" operation on a button's actionPerformed event. Users expect slightly longer delays for such button actions.
Thank you for your help. Sorry for the late reply.
By the way, how do you analyze these thread dumps? I want to know the processes, so that I can work on my own when new issue arise.
You can open the thread dump JSON files in Kindling for a nicer presentation:
But there really is no replacement for hard-won domain knowledge here. As Phil stated - look at the EventQueue thread, look at the stacktrace, and piece together what it was doing at the time.