Out of memory

I’m creating a rather large module and it says vassal is running out of memory. I know to increase heap size in preferences but where is preferences in the module editor.
Thanks

It’s not in the module editor.

It’s a preference that’s accessible from the menu in-game (File->Preferences). What a user would have to do is load it, but before running it, change their preference to a larger heap size. Then, shut it down and re-load it. It should now run with a larger heap.

This is something you’ll probably have to pass on to your users if it’s an extensively large module.

Also, have you tried compressing your graphics? I had a PNG map graphic that was 57 megs and I just loaded it into a graphics editor and re-saved it as a JPG. Brought it down to just over 6 megs. I used 50% quality so you can see some loss of quality if you zoom up real close but the memory savings far outweigh the graphics issues, imo. You may want to keep the quality up but even so, there are graphics programs that will keep up the quality and still save you lots of real estate.

I’ve long understood that image file size is not relevant to RAM consumption, but rather it’s the pixel dimensions that are the key impact. See for instance: https://forum.vassalengine.org/t/understanding-module-size-impacts-solutions/8678/1

Thank you. That’s a big help

Thus spake DrNostromo:

Also, have you tried compressing your graphics? I had a PNG map graphic
that was 57 megs and I just loaded it into a graphics editor and
re-saved it as a JPG. Brought it down to just over 6 megs. I used 50%
quality so you can see some loss of quality if you zoom up real close
but the memory savings far outweigh the graphics issues, imo. You may
want to keep the quality up but even so, there are graphics programs
that will keep up the quality and still save you lots of real estate.

This will not reduce memory usage. All it will do is reduce the quality
of your images. The only relevant factor for how much memory images
use in VASSAL is their dimensions in pixels. The file size is totally
irrelevant. I know this because I wrote the image handling code.

DO NOT convert a PNG to a JPEG to reduce memory usage.


J.