MapTool & File Sizes
Moderators: dorpond, trevor, Azhrei
Forum rules
PLEASE don't post images of your entire desktop, attach entire campaign files when only a single file is needed, or generally act in some other anti-social behavior.
PLEASE don't post images of your entire desktop, attach entire campaign files when only a single file is needed, or generally act in some other anti-social behavior.
MapTool & File Sizes
Hello. First of all, I have to tell you I discovered MapTool a few weeks ago, I've played around with it and I am impressed with its power! There is just so much to like about the capabilities of MapTool and the responsiveness of the developers.
In one of my get aquainted sessions with MapTool, I got online with a friend and we were testing the responsiveness of our connection among other things. We were adding a dozen or more tokens and a few maps. After a while we noticed it was taking longer for new tokens to reach the other's computer - on the order of magnitude of minutes rather than seconds. We both have high speed internet connections, so we found this delay rather odd. We also noticed a set of numbers on the bottom right side of the MapTool window in the format xxM/yyM, where xx was always less than or equal to yy. We were guessing this was tracking memory usage (the M is for megabytes?). These two number eventually pegged at 127 and would go no higher. At this point we could add no more tokens, even after we deleted all the existing ones. Maybe some of our choice for images to use as tokens were unreasonable (500kb and up) which may have put undue stress on MapTool.
The above got us wondering if there was a limit on number of tokens (and maps) and/or their total files sizes. Also, is there a recommendation for a reasonable file size on maps? On tokens? The number of maps and/or tokens? I noticed that TokenTool creates tokens in the 15kb to 25kb range for the ones I tested. When we eventually play online using MapTool, there will be four of us, all with high speed internet connections. Are there any do's or don'ts to keep MapTool responding quickly to map updates for all of us?
Thank you for your time.
In one of my get aquainted sessions with MapTool, I got online with a friend and we were testing the responsiveness of our connection among other things. We were adding a dozen or more tokens and a few maps. After a while we noticed it was taking longer for new tokens to reach the other's computer - on the order of magnitude of minutes rather than seconds. We both have high speed internet connections, so we found this delay rather odd. We also noticed a set of numbers on the bottom right side of the MapTool window in the format xxM/yyM, where xx was always less than or equal to yy. We were guessing this was tracking memory usage (the M is for megabytes?). These two number eventually pegged at 127 and would go no higher. At this point we could add no more tokens, even after we deleted all the existing ones. Maybe some of our choice for images to use as tokens were unreasonable (500kb and up) which may have put undue stress on MapTool.
The above got us wondering if there was a limit on number of tokens (and maps) and/or their total files sizes. Also, is there a recommendation for a reasonable file size on maps? On tokens? The number of maps and/or tokens? I noticed that TokenTool creates tokens in the 15kb to 25kb range for the ones I tested. When we eventually play online using MapTool, there will be four of us, all with high speed internet connections. Are there any do's or don'ts to keep MapTool responding quickly to map updates for all of us?
Thank you for your time.
- trevor
- Codeum Arcanum (RPTools Founder)
- Posts: 11311
- Joined: Mon Jan 09, 2006 4:16 pm
- Location: Austin, Tx
- Contact:
Re: MapTool & File Sizes
Welcome welcome !Gregolas wrote:Hello. First of all, I have to tell you I discovered MapTool a few weeks ago, I've played around with it and I am impressed with its power! There is just so much to like about the capabilities of MapTool and the responsiveness of the developers.
You are right about what those numbers mean. I believe the default max memory size is 128, so that was definitely hitting the cap. I don't know why it's set so low, maybe to keep it playing nice on lower end systems.Gregolas wrote:In one of my get aquainted sessions with MapTool, I got online with a friend and we were testing the responsiveness of our connection among other things. We were adding a dozen or more tokens and a few maps. After a while we noticed it was taking longer for new tokens to reach the other's computer - on the order of magnitude of minutes rather than seconds. We both have high speed internet connections, so we found this delay rather odd. We also noticed a set of numbers on the bottom right side of the MapTool window in the format xxM/yyM, where xx was always less than or equal to yy. We were guessing this was tracking memory usage (the M is for megabytes?). These two number eventually pegged at 127 and would go no higher.
That's really odd about it slowing down. It's possible that when memory filled up it was having a hard time juggling the network management. I'll do some testing and see what I can find.
You were probably getting OutOfMemory exceptions in the background.Gregolas wrote: At this point we could add no more tokens, even after we deleted all the existing ones.
Gregolas wrote: Maybe some of our choice for images to use as tokens were unreasonable (500kb and up) which may have put undue stress on MapTool.
This is probably the problem, 500k is reasonable for the background map, but would very quickly fill up memory if you have a bunch of these hanging around as tokens. When you switch maps, it removes the old map from memory so that you only ever have one really big image in memory. Tokens are typically very small, on the order of a couple k, and often only a couple hundred bytes. And that's usually fine since the images are rendered very small. We also recommend background maps that are about 100-200k, since the quality is roughly the same, and the transmit times are greatly improved. It's possible that the slowness you saw was the transferring of the large images.
The only limit is the size of your memory (currently capped at 128Megs, I'll see about getting that increased), and your tolerance for slow rendering (the more tokens, the slower rendering becomes), although with reasonable sized tokens, I've had many hundred (600-700) tokens rendering with only barely noticable performance hit.Gregolas wrote:The above got us wondering if there was a limit on number of tokens (and maps) and/or their total files sizes.
We recommend background maps of around 100-300k, and tokens that are roughly sized at the eventual grid size, which would be about 128 pixels by 128 pixels.Gregolas wrote:Also, is there a recommendation for a reasonable file size on maps? On tokens? The number of maps and/or tokens? I noticed that TokenTool creates tokens in the 15kb to 25kb range for the ones I tested.
I'll see if I can reproduce the slowness over time, I might need your help. Try the same test you did before, but use a moderate sized map, and much smaller tokens and let me know how it goes.Gregolas wrote:When we eventually play online using MapTool, there will be four of us, all with high speed internet connections. Are there any do's or don'ts to keep MapTool responding quickly to map updates for all of us?
Performance of the renderer and the memory footprint are a really big focus for post 1.0 MapTool.
Dreaming of a 1.3 release
Re: MapTool & File Sizes
This is the maximum set in the Webstart file. If you set the number too high you start getting this exception:trevor wrote: You are right about what those numbers mean. I believe the default max memory size is 128, so that was definitely hitting the cap. I don't know why it's set so low, maybe to keep it playing nice on lower end systems.
Code: Select all
Exception java.lang.OutOfMemoryError: requested <size> bytes. Out of swap space?
Code: Select all
javaw -Xmx256M -jar maptool-1.0M9.b105.jar
You can turn on the console to see exceptions using the Java Control panel. You can start the control panel with the command:trevor wrote:You were probably getting OutOfMemory exceptions in the background.Gregolas wrote: At this point we could add no more tokens, even after we deleted all the existing ones.
Code: Select all
javaws -viewer
Thanks all. Good information. We'll probably be doing a "stress test" in the next week or two, so I'll let you know what we find. This next test will be with more reasonably sized tokens and maps. We didn't have much in the way of map images and tokens prepared for the first test, hence the absurd token file sizes and such.
Thanks again for the quick responsiveness. I'm really looking forward to using these excellent tools in our online D&D campaign. <bows>
Thanks again for the quick responsiveness. I'm really looking forward to using these excellent tools in our online D&D campaign. <bows>
I thought I'd post a followup from our second attempt at using MapTool. This time we used it in a real game session. We used the release candidate 1.0 with one GM and three players. I used TokenTool to make reasonably sized tokens and for the map we only played on an unbounded grass map. This time, everything went almost perfect. Map updates were lightning fast and we had almost 50 tokens on the map. The only glitch was limited to one player. At first he had difficulty connecting but was able to after he rebooted. Later, his map stopped updating as we moved tokens around. I believe for that he just disconnected from the server (which took a few minutes), closed MapTool, relaunched it and connected again. He had to do this one other time during our session. He was the only one with any kind of problem.
All in all it was a great gaming experience thanks to MapTool. You have four thumbs up from our gaming group!
All in all it was a great gaming experience thanks to MapTool. You have four thumbs up from our gaming group!
Also, don't forget you can double click on the memory monitor to 'clean up' memory a bit. If you hit the wall it should have attempted the clean up itself but it never hurts to try. A popup on the memory bar might be nice.
Also, on memory, does it only keep the current map and tokens in memory and store the rest off until needed or does everything stay in memory?
Also, on memory, does it only keep the current map and tokens in memory and store the rest off until needed or does everything stay in memory?
- trevor
- Codeum Arcanum (RPTools Founder)
- Posts: 11311
- Joined: Mon Jan 09, 2006 4:16 pm
- Location: Austin, Tx
- Contact:
You'll notice that when you switch between maps you get a very brief "Loading" screen, that's maptool reloading the image. It only keeps one map image in memory at once. That's how it's able to have lots of maps and still stay reasonably good on memory.
Not tokens, that's a different story. Most tokens are pretty small, so it just keeps them in memory. However, I'm planning on creating a background thread in the code that clears out ANY image resource that hasn't been looked at in a couple minutes, and reload them when next requested.
Not tokens, that's a different story. Most tokens are pretty small, so it just keeps them in memory. However, I'm planning on creating a background thread in the code that clears out ANY image resource that hasn't been looked at in a couple minutes, and reload them when next requested.
Dreaming of a 1.3 release
That is good to know about the memory management feature, RPTroll. Thanks for the tip.
BTW, I forgot to add that while using MapTool, we are all using Yahoo Messenger's voice communication feature. So MapTool was sharing our bandwidths with our game voice communications and we still had very fast response times and map updates.
BTW, I forgot to add that while using MapTool, we are all using Yahoo Messenger's voice communication feature. So MapTool was sharing our bandwidths with our game voice communications and we still had very fast response times and map updates.