GUI freezes for longer durations when switching between sub-circuits in large Logisim circuit designs
#1.735 geöffnet am 26.04.2023
Repository-Metriken
- Stars
- (3.695 Sterne)
- PR-Merge-Metriken
- (Durchschn. Merge 3T 18h) (47 gemergte PRs in 30 T)
Beschreibung
Our students work each year on a digital design project over the course of several weeks to implement each time a different system. The bigger the circuits become, the more noticeable and annoying becomes the lag when opening a .circ file or switching between sub-circuits of the already open file. This is especially noticeable auto-propagation is enabled in the Simulate menu. The cause is the initialisation of the simulation engine for the opened sub-circuit. So, if the sub-circuit is opened a second time, there's typically no lag. Unfortunately, the initialisation of the simulation engine seems to happen in the GUI thread or blocking the latter one. This unusable GUI is annoying for the user. At the minimum, I would suggest to inform the user about the initialisation of the simulation engine, as it is already done when the engine is stopped. To avoid graphical glitches, one may consider to show a message only after a noticeable time has passed, e.g., 1 second, and ask for patience. Ideally, this initialisation should happen in a background thread, which doesn't block the GUI thread and the drawing of the just opened sub-circuit.
@kevinawalsh: Could you maybe provide some insight how this issue could be fixed, as you have already considerable experience with the simulation engine part of Logisim-evolution?