MapTool & File Sizes

Thoughts, Help, Feature Requests, Bug Reports, Developing code for...

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. :)
Post Reply
Gregolas
Kobold
Posts: 12
Joined: Sun Apr 16, 2006 12:43 am

MapTool & File Sizes

Post by Gregolas »

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.

Emryys
Dragon
Posts: 780
Joined: Tue Jan 31, 2006 9:01 pm
Location: Beneath the Aurora Borealis
Contact:

Post by Emryys »

The staff will chime in soon I suspect but I don't think these upper limits have been thoroughly tested... :?:

We've been so busy finding bugs in all the cool new features :oops: :wink:

They've been very good about finding bottlenecks, usually by people sending them campaign files....
Game On!
Image

User avatar
trevor
Codeum Arcanum (RPTools Founder)
Posts: 11311
Joined: Mon Jan 09, 2006 4:16 pm
Location: Austin, Tx
Contact:

Re: MapTool & File Sizes

Post by trevor »

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.
Welcome welcome !
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.
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.

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.
Gregolas wrote: At this point we could add no more tokens, even after we deleted all the existing ones.
You were probably getting OutOfMemory exceptions in the background.
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.
Gregolas wrote:The above got us wondering if there was a limit on number of tokens (and maps) and/or their total files sizes.
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: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.
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: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?
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.

Performance of the renderer and the memory footprint are a really big focus for post 1.0 MapTool.
Dreaming of a 1.3 release

User avatar
jay
RPTools Team
Posts: 1767
Joined: Tue Feb 07, 2006 1:07 am
Location: Austin, Tx

Re: MapTool & File Sizes

Post by jay »

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.
This is the maximum set in the Webstart file. If you set the number too high you start getting this exception:

Code: Select all

Exception java.lang.OutOfMemoryError: requested <size> bytes. Out of swap space?
The easiest way to change the value is do download the zip file and run it with the command:

Code: Select all

javaw -Xmx256M -jar maptool-1.0M9.b105.jar
I believe that the recommendation is that the number after the -Xmx be no bigger than your computer's physical memory size, but they may have changed this since the last time I checked. The numbers in the jar file name change depending on the version of maptool that you have downloaded.
trevor wrote:
Gregolas wrote: At this point we could add no more tokens, even after we deleted all the existing ones.
You were probably getting OutOfMemory exceptions in the background.
You can turn on the console to see exceptions using the Java Control panel. You can start the control panel with the command:

Code: Select all

javaws -viewer
The console control is in the advanced settings. If you see anything in there that looks to be a problem, tell us about it here.

Gregolas
Kobold
Posts: 12
Joined: Sun Apr 16, 2006 12:43 am

Post by Gregolas »

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>

User avatar
trevor
Codeum Arcanum (RPTools Founder)
Posts: 11311
Joined: Mon Jan 09, 2006 4:16 pm
Location: Austin, Tx
Contact:

Post by trevor »

As a side note, some default tokens have been added to the ALPHA version, you can add them with Help->Restore Default Images. I'm in the process of finding a map to include.
Dreaming of a 1.3 release

Gregolas
Kobold
Posts: 12
Joined: Sun Apr 16, 2006 12:43 am

Post by Gregolas »

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!

User avatar
trevor
Codeum Arcanum (RPTools Founder)
Posts: 11311
Joined: Mon Jan 09, 2006 4:16 pm
Location: Austin, Tx
Contact:

Post by trevor »

Super cool, thanks for posting your update !

We're planning on putting in some intelligence into the connection so that it can autodetect when a connection goes dead, and then auto reconnect.
Dreaming of a 1.3 release

User avatar
RPTroll
TheBard
Posts: 3159
Joined: Tue Mar 21, 2006 7:26 pm
Location: Austin, Tx
Contact:

Post by RPTroll »

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?
ImageImage ImageImageImageImage
Support RPTools by shopping
Image
Image

User avatar
trevor
Codeum Arcanum (RPTools Founder)
Posts: 11311
Joined: Mon Jan 09, 2006 4:16 pm
Location: Austin, Tx
Contact:

Post by trevor »

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.
Dreaming of a 1.3 release

Gregolas
Kobold
Posts: 12
Joined: Sun Apr 16, 2006 12:43 am

Post by Gregolas »

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.

Post Reply

Return to “MapTool”