slaclab / pydm

Python Display Manager
http://slaclab.github.io/pydm/
Other
111 stars 76 forks source link

Shutdown speed issues with large screens #1049

Open ZLLentz opened 7 months ago

ZLLentz commented 7 months ago

Describe the bug

Screens with large numbers of PyDM widgets take a long time to close.

Expected behavior

Closing a PyDM screen should be somewhat fast, or at least much faster than it is now (~30s - 1 minute for my application). The operating system should be able to clean up most of the resources without too much special handling in Python.

Steps to Reproduce

I ran a profiler on the closure of pmps-ui, a particularly large applications. I'm attaching the output here, which unfortunately github does not display interactively as it does on my local computer. The full version and some related discussions can be found in the slac slack at https://slac.slack.com/archives/C03KJMEUY5S/p1699988522361479

Note the scale here: 100 samples per second = ~60 seconds to close.

profile

My Platform

rhel7 python 3.9