vassalengine/vassal

Cumulative performance drag when editing a set of duplicate prototypes

riverwanderer opened this issue · 3 comments

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.

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.

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

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