missionpinball / mpf-monitor

Graphical utilty which connects to MPF to let you visually control, troubleshoot, and see the status of the machine
http://missionpinball.org
MIT License
11 stars 10 forks source link

MPF Monitor slows down greatly when large device tree is expanded #30

Open kylenahas opened 3 years ago

kylenahas commented 3 years ago

This seems to be an issue with lots of devices on the playfield.

To recreate, open a MPF Monitor project with lots of devices on the playfield (Demo Man example works), and expand the "light" device tree. MPF Monitor slows incredibly. Collapsing the large tree returns speed to normal.

I am not sure of the root cause, but it may be related to storing the data for playfield devices in the tree's model. In theory this issue also existed before my changes to the treeview rendering, but I'm not positive. I can test on an older version if wanted.

Potentially we could separate the data for the playfield devices from the tree model, but I'm not sure if that's the way to go.

kylenahas commented 3 years ago

The problem seems to be greatly exacerbated while lots of data is being updated (eg. during the "attract" mode). If there is not much data activity, the slowdown isn't as apparent.