Create account / Log in

Out of memory

Talk about module design ideas and techniques.

Moderators: Tim M, uckelman

Out of memory

Postby wargamer410 » February 17th, 2020, 12:24 am

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
wargamer410
 
Posts: 13
Joined: September 30th, 2018, 6:32 am

Re: Out of memory

Postby DrNostromo » February 18th, 2020, 6:02 pm

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.
User avatar
DrNostromo
 
Posts: 1053
Joined: December 21st, 2007, 3:54 am
Location: Wine Country, Cal. USA

Re: Out of memory

Postby JoelCFC25 » February 18th, 2020, 8:28 pm

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: viewtopic.php?f=2&t=9585
JoelCFC25
 
Posts: 689
Joined: October 12th, 2010, 5:15 pm
Location: Minnetrista, MN

Re: Out of memory

Postby wargamer410 » February 20th, 2020, 6:13 am

Thank you. That’s a big help
wargamer410
 
Posts: 13
Joined: September 30th, 2018, 6:32 am

Re: Out of memory

Postby uckelman » February 23rd, 2020, 2:29 pm

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.
User avatar
uckelman
Site Admin
 
Posts: 8380
Joined: December 10th, 2007, 9:48 am
Location: Durham, England


Return to Module Design

Who is online

Users browsing this forum: No registered users and 5 guests