vassalengine / vassal

VASSAL, the open-source boardgame engine
https://vassalengine.org
GNU Lesser General Public License v2.1
424 stars 101 forks source link

Cumulative performance drag when editing a set of duplicate prototypes #13393

Closed riverwanderer closed 2 months ago

riverwanderer commented 3 months ago

Observed when I replicated a folder of some 29 prototypes. I then proceeded to edit the copied Prototypes, to give them unique names. As I progressed through the list, performance became slower and slower, until at one point (after about prototype 15 or so in the list), the delay seemed never ending, with high CPU / memory usage and I had to force quit the Vassal session.

The set of prototype was used across a group of 70 pieces - one prototype per piece, with each prototype on between 1 and 6 pieces. Probably not relevant but each Prototype contained a single trait - a layer with 1 image, set to always display. The images were all scaled to the same value.

Workaround - by saving the module and restarted I was able to complete the work.

riverwanderer commented 3 months ago

Further investigation shows that this is a reproducible issue, provoked simply by traversing a list of prototypes, changing the name of each one as you go.

To repro:

Open a new module. Create a list of prototypes - simply cloning a set with the default name is enough. A list of 20 is enough. Now, starting at the top, edit the name of each one. By around 10-15 in the list, you should start to notice the response start to get progressively worse in at the dialog close.

BrentEaston commented 2 months ago

Found the issue (my first though was you where imagining it!), there's a new build 13393-PrototypesIssue going up for this one.

riverwanderer commented 2 months ago

Tested the fix above; no performance lag now, even after 15+ prototype names.