Need guide on how to interpret this NonResponsiveEDT files

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.

Thank you.

Best Regards,
Lester

NonResponsiveEdt-2024-07-17_213022.json (40.5 KB)
NonResponsiveEdt-2024-07-17_214729.json (43.2 KB)
NonResponsiveEdt-2024-07-17_214806.json (46.3 KB)
NonResponsiveEdt-2024-07-17_214824.json (43.2 KB)
NonResponsiveEdt-2024-07-17_215651.json (46.3 KB)
NonResponsiveEdt-2024-07-17_214743.json (43.2 KB)

1 Like

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.

1 Like

Hello pturmel,

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.

Best Regards,
Lester

You study the stack trace of the thread named "AWT-EventQueue-0" or similar.

2 Likes

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.

1 Like