What are the limits on vassal modules

I am curious cause I am still relatively new to making modules about what the hard limits are. this is because i am working on the legendary marvel card game and the original developers where running into performance issues related to JVM initial heap memory back in 2014. so basically what things should i not do to bloat the module and there for tank performance.

Two things which can lead to performance problems are huge images and deeply nested trait stacks. Do you know more about what problems the original developers had?

Here’s some more instances that occur to me:

Trait expressions that are computed on the fly - especially when those expressions include the Sum/Count family functions across large numbers of pieces. Traits in this category are:

  • Calculated Property
  • Text Label (text field)
  • Layer (set layer using expression field)
    These expressions can affect performance across the module in general, as they will kick in whenever the screen is refreshed. They can be convenient and many uses will not cause problems, just be aware if you are making extensive use with complex expressions.

Complex expressions in Trigger Action and Restrict Commands traits will exacerbate the performance overhead of deep lists of traits. This might show when the piece’s context menu is built (normally, right-click but can be left-click via Action Button).

When a key command is sent to the piece, the long list of traits issue will be multiplied by the number of pieces receiving the command - i.e. a multiplier on GKC actions…better practice is to target a GKC accurately than have some pieces ignore the key command. In general, poorly constructed GKC or related function (Count/Sum) conditions might contribute. Always construct these to narrow down the scope of a search as early as possible and as much as possible during operation of the trait or function.

Got a zulu miniatures module that max heap is 8192! for Islandlwana but need to rework it as it is very sluggish in changing views. Granted it is man to man in scale lol!

The size of your map and other graphics is likely to be the cause - or at least, performance will improve if you can reduce them.