Maptool: Performance issue when moving tokens long distance or measuring same

Created on 1 Feb 2020  路  14Comments  路  Source: RPTools/maptool

Describe the bug
Moving tokens long distances (200+ grid cells), or measuring the similar distances, is very laggy and frequently times out.

This is somehow tied to the Map Distance per Cell setting. A setting <= 1.0 works fine. Anything above 1.0 and the problem shows itself.

Turning off AI has no impact.

To Reproduce
Steps to reproduce the behavior:

  1. On the default map make sure the Distance per Cell is 5.0
  2. Drop a token (might want a large one) on map.
  3. Zoom out enough to view 200+ grid cells
  4. Drag token across width of map. Notice it gets slower and slower to respond with distance.
  5. Switch to measurement tool. See same behavior.

Expected behavior
Should be no or minimal lag/delay for these actions. MT 1.5.10 did not display this behavior.

MapTool Info

  • Version: 1.5.11/12
  • Install: New

Desktop (please complete the following information):

  • OS: Windows
  • Version: 10

Additional context
Reported by Aninimouse on Discord.

bug tested

Most helpful comment

Tested against Terrain Mods, Token Ignores, Map rounding settings with no issues. Performance is back to 1.5.10 levels.

All 14 comments

It seems this started with PR c983dc18

I wasn't able to duplicate it myself, it seemed to move smooth enough for me.

Still a very noticeable delay with 1.5.14 between dragging and seeing the path plus distance appear. 100% reproducible. 1.5.10 has no delay.

In my case with a Distance per Cell of 5.0, I'm getting noticeable lag at a distance of around ~300 (so about 60 cells).

It gets real bad at a distance of around ~1000 (so about 200 cells).

No such lag in 1.5.10.

Same. At 300 cells, it might be a full second delay on my system.

Blank map?

Yep.

Tried setting Distance per Cell to 20.0 and it seems worse than at 5.0.

Somehow, distance being bigger causes the slowdown?

Yup. Set your map to 1.0 and it is just as fast as it was in 1.5.10.

In 1.5.10 the distance was calculated without the Distance per Cell / cell_cost , and it was multiplied in at the very end.

That was changed in 1.5.11.

PR #1398 fixes this for me. There might be a more elegant approach, though.

Tested against Terrain Mods, Token Ignores, Map rounding settings with no issues. Performance is back to 1.5.10 levels.

Awesome, thanks for fixing it, kind of weird behavior, would not have expected that...

Was this page helpful?
0 / 5 - 0 ratings