Log in

View Full Version : Slow Token Movement



uMike
June 30th, 2023, 02:01
Heya.

Has anyone else seen very slow token movement on maps? My play groups are using PF1 and PF2 rulesets and we've run into slow token movement frequently, but tonight trying to play PF2 was almost impossible. Moving 10 squares on the map was taking upwards of a minute. We haven't been able to find any rhyme or reason to why tokens move slowly some nights and fine another night. Sometimes closing the map and reopening it helps for a short time, but tonight it didn't help at all.

Are we the only ones seeing this?

damned
June 30th, 2023, 02:23
How big are the maps?
LOS enabled?
How many tokens in your FG data folder?
What is size of campaign folder?

What is GPU load on your computer when this is happening?
Does it happen if you test without players connected?

uMike
June 30th, 2023, 02:39
We've seen this on maps of different sizes. The one tonight is fairly large and came with the Abomination Vaults AP 1 module. We've seen it on smaller hand-made maps as well.

It's happened with four different people hosting four different campaigns. I'm not sure how many tokens are in any of their folders. I can check mine once we're done playing tonight since I'm one of the GM's that has seen this.

LOS and Lighting enabled on three of the four with the last host only have LOS on.

The Campaign folder tonight should just have the first adventure of Abomination Vaults in it.

We have never seen this issue without players connected. It has the feel of a memory leak when the map is opened as movement often gets worse over time.

damned
June 30th, 2023, 03:11
If it is happening only with players, when it happens get each person to check their GPU load through task manager. One of them might be struggling and slowing everyone down.

Moon Wizard
June 30th, 2023, 03:13
I haven't heard this generally reported, so it might be code from extensions creating extra overhead or perhaps some unique way that you have the maps set up.

Are you running any extensions? Do you get the same issue when you disable them before loading the campaign?
Are you adding anything extra to the maps?
Have you added custom graphics to the images/tokens folders within the FG data folder? How many and how big is the folder in overall file size?

Regards,
JPG

pindercarl
June 30th, 2023, 03:39
Are you using token lock with the GM confirming the movement? Or, is the movement unlocked and the players are shuffling their tokens about? Token lock movement is evaluated when accepted on each client, i.e. only one network message is sent that contains the movement path. Without token lock, a network message is sent whenever a token crosses a movement threshold (I think it's 20% of a grid). If you are using grid snap, then it would be each time a token moves to a new snap position. If you are using token lock, then we can likely rule out network speed as the issue.

uMike
June 30th, 2023, 04:19
Some of our campaigns use token lock constantly but others toggle it on and off between exploration and combat movement. We all restarted FG tonight and when we came back things were running better. I'm thinking it might be the GPU load that Damned mentioned. We're going to check the next time we see a serious problem.

Thank you everyone for the suggestions. We've been trying to figure this out for a while and ran out of things to try.

Lo Zeno
June 30th, 2023, 09:48
One thing to check: are you applying light effects to the characters of your players? E.g. are they carrying torches, or do you apply colored lights for their magic weapons, or a Light spell centered on them to explore the dark areas? I had similar slowdowns in fairly small maps when many characters had light effects on them and crossed each other's illuminated area - in that case the best solution is to remove the light effects with the smallest radius and leave only the largest ones (to account for their actual area of vision)

uMike
July 5th, 2023, 04:19
We're playing again right now with me as host. For this encounter, I'm using a small map, no lighting, no line-of-site, and tokens locked. I did use several map tiles from the Pathfinder Map tiles series to create the map. Does it matter if there are a lot of layers? Every tile added a new layer as I made this map before I figured out how to make them one layer. It's producing slow movement on the map, but it also is slowing down FG entirely. Rolls are delayed from showing up, adding a buff to the combat tracker takes several seconds, etc. I keep thinking it's to do with the map because closing the map and reopening it helps for a little while. In fact, closing the map and waiting a few moments clears up the problem entirely.

We all checked our GPU usage tonight but mine was the highest peaking at 40%. That seems rather low to be causing problems.

Thanks for the ideas. We're still trying to nail this down. I really thought it was a common problem since four different GM's in our group have had to deal with it, but I guess it's just us for some reason.

damned
July 5th, 2023, 05:28
We're playing again right now with me as host. For this encounter, I'm using a small map, no lighting, no line-of-site, and tokens locked. I did use several map tiles from the Pathfinder Map tiles series to create the map. Does it matter if there are a lot of layers? Every tile added a new layer as I made this map before I figured out how to make them one layer. It's producing slow movement on the map, but it also is slowing down FG entirely. Rolls are delayed from showing up, adding a buff to the combat tracker takes several seconds, etc. I keep thinking it's to do with the map because closing the map and reopening it helps for a little while. In fact, closing the map and waiting a few moments clears up the problem entirely.

We all checked our GPU usage tonight but mine was the highest peaking at 40%. That seems rather low to be causing problems.

Thanks for the ideas. We're still trying to nail this down. I really thought it was a common problem since four different GM's in our group have had to deal with it, but I guess it's just us for some reason.

40% should not be an issue.

pindercarl
July 5th, 2023, 16:43
Since you have seen this on different maps and the GPU usage seems reasonable, I would check any extensions you have running. My suspicion is that the slow down is caused by an extension that affects tokens, or perhaps is linked to the combat tracker.

JohnD
July 5th, 2023, 23:39
I have noticed the following:

- if a token that is moving has the default lantern light source applied to it, movement is extremely slow even if there are no other light sources on the map. It seems like FG is redrawing the visibility at each 1/4 square of movement for not only the moving token, but indeed every other token on the map as well. The token literally chugs at 1/4 of a square at a time.
- if I approve more than one token to move at the same time, and one of the tokens has said lantern light source applied to it, all tokens approved for movement are extremely slow, regardless of whether or not the 2nd token has a light source or not.
- if I approve a token to move that doesn't have a light source applied to it, the token zips across the map to it's intended location. This can be right before the token(s) in the first two points are approved to move, or indeed right after they have finished moving.
- environmental light sources (i.e. not applied to a token) seem to make no impact to the movement one way or the other.
- if the map is broken up into multiple areas (i.e. the main floor of a building and the basement and 2nd floor are beside it on the same map, and you have tokens on multiple floors, movement for all tokens is extremely slow.

Edit: this is with tokens locked.

YMMV and all that.

Edit 2: I have started when working with maps that contain more than one "floor" on them, in addition to the LoS on walls, whatever, I put a LoS box around the whole section. Anecdotally this seems to have helped, but by no means is it conclusive in my eyes. I also add VISMAX: 75 to all CT actors with normal sight and up that to 90 for those with exceptional sight like elves.

pindercarl
July 5th, 2023, 23:50
I have noticed the following:

- if a token that is moving has the default lantern light source applied to it, movement is extremely slow even if there are no other light sources on the map. It seems like FG is redrawing the visibility at each 1/4 square of movement for not only the moving token, but indeed every other token on the map as well. The token literally chugs at 1/4 of a square at a time.
- if I approve more than one token to move at the same time, and one of the tokens has said lantern light source applied to it, all tokens approved for movement are extremely slow, regardless of whether or not the 2nd token has a light source or not.
- if I approve a token to move that doesn't have a light source applied to it, the token zips across the map to it's intended location. This can be right before the token(s) in the first two points are approved to move, or indeed right after they have finished moving.
- environmental light sources (i.e. not applied to a token) seem to make no impact to the movement one way or the other.
- if the map is broken up into multiple areas (i.e. the main floor of a building and the basement and 2nd floor are beside it on the same map, and you have tokens on multiple floors, movement for all tokens is extremely slow.

Edit: this is with tokens locked.

YMMV and all that.

Edit 2: I have started when working with maps that contain more than one "floor" on them, in addition to the LoS on walls, whatever, I put a LoS box around the whole section. Anecdotally this seems to have helped, but by no means is it conclusive in my eyes. I also add VISMAX: 75 to all CT actors with normal sight and up that to 90 for those with exceptional sight like elves.

In their last post, the OP said they were having the issue without LOS and lighting. However, given your observations, I'll take a look at the lantern scenario. There should be very little additional overhead for a token with LOS carrying a light source.

Aramis Dante
July 10th, 2023, 21:05
I have had a problem with this as well. I have some players overseas so I thought it might be just that. It is not consistent, usually when I try to move more than one token at a time.

uMike
August 2nd, 2023, 04:00
So things have been running smoothly for a couple weeks now with the games I've run and played in not having any slow movement issues at all. Until tonight when I ran my Skull & Shackles game. The map in use had several of the Paizo flip tiles used to build it and I had put a cloud fx layer on it. Tokens were locked the whole time and no LOS or lighting in use. We had slow movement almost immediately, and it got worse every time a token moved. Closing the map and reopening it resets the problem for the person who reopened the map and they get to watch the movement degrade again. One player in this instance reported his GPU hitting 85 percent, so maybe that was it but we still don't know what caused that. I turned off the cloud fx but that didn't seem to change anything.

The degradation of token movement feels like a memory leak while the map is open, but I've yet to isolate the cause. And if the problem was another player's GPU load, would closing and reopening a map on a separate client be able to reset the issue for that client?

Moon Wizard
August 2nd, 2023, 04:31
Did you try turning off the cloud FX layer to see if that was causing any issues?

Regards,
JPG

uMike
August 6th, 2023, 02:35
Yes, I removed the cloud fx layer and nothing changed. We still saw the degradation at roughly the same rate.

Moon Wizard
August 7th, 2023, 21:23
Can you provide a zipped up copy of your campaign, and the name of the Image record that was causing the issue?

Regards,
JPG

uMike
August 11th, 2023, 01:03
Should I post it here or is there a better place to send my zipped campaign?

Moon Wizard
August 11th, 2023, 03:40
You can post the link here; or send in to Support via the link at the top. It's up to you.
If you post here, then others can look at as well if they have time to look.

Regards,
JPG

uMike
August 15th, 2023, 06:02
https://drive.google.com/file/d/1Z9h345s3AYSVl2fVJzOeiOl-joRJBY7o/view?usp=sharing

Forgive me, I haven't shared files via link before. I think this will get you to my Skull and Shackles campaign folder all zipped up. Let me know if the link doesn't work and I'll try again.

We've had the problem on several images, but the latest one is called "Boarding Devil's Pallor."

~uMike

uMike
September 5th, 2023, 02:34
Was anyone able to take a look at that file? Did I share it properly?

Moon Wizard
September 5th, 2023, 04:48
Let me check in with @pindercarl and see if we looked at this already. I know we have a fix for a related issue queued for the next release already that may help.

Regards,
JPG

Moon Wizard
September 5th, 2023, 21:14
I took a quick look from a high-level.

Some thoughts:
* Any extension that offers overlay or other always-on tracking behaviors can have an impact on performance. I suggest disabling ALL extensions for your next session to see if it helps.
* You have over 50 modules loaded in this campaign. Try removing the modules you don't need for the current session, and see if that helps.

Question:
* Which map(s) are the ones you were seeing the slowdown on? There are a lot of maps in the campaign.

Regards,
JPG

uMike
September 7th, 2023, 00:33
The last map we had trouble with was "Boarding Devil's Pallor."

pindercarl
September 14th, 2023, 02:10
The last map we had trouble with was "Boarding Devil's Pallor."

Thanks for your patience, uMike. I didn't find anything particular to the map in question. However, we've uncovered a few memory leaks with images that have been patched and could be affecting performance on your maps. The fixes should be in the next release.

BushViper
September 16th, 2023, 18:41
However, we've uncovered a few memory leaks with images that have been patched and could be affecting performance on your maps. The fixes should be in the next release.

This is fantastic news.

Is the improvement only going to be evident in rare situations or more broadly applicable? Also, I know an increase in performance can be difficult to quantify, but if you had to estimate is it 10%, 25%, more?

pindercarl
September 16th, 2023, 18:52
This is fantastic news.

Is the improvement only going to be evident in rare situations or more broadly applicable? Also, I know an increase in performance can be difficult to quantify, but if you had to estimate is it 10%, 25%, more?

The improvement is broadly applicable. As these are memory leak fixes, they will not improve performance above the initial performance when the image is loaded. However, it should prevent the performance from degrading over time.

Moon Wizard
September 16th, 2023, 18:53
We do not know what the impact will be exactly, because it heavily depends on how maps were used, which map/ruleset features were used, and more. In general, anything that is a memory leak will lead to slower performance over the long haul (i.e. longer sessions with more maps/features are more impacted). The leaks we found were primarily due to the way the Unity engine was handling disposed materials (i.e. not removing from memory as expected, and didn't happen in every case). So, the result is that things should be "better", especially in longer campaigns, more graphics used, more features used, etc.

Regards,
JPG

BushViper
September 16th, 2023, 19:10
We do not know what the impact will be exactly, because it heavily depends on how maps were used, which map/ruleset features were used, and more. In general, anything that is a memory leak will lead to slower performance over the long haul (i.e. longer sessions with more maps/features are more impacted). The leaks we found were primarily due to the way the Unity engine was handling disposed materials (i.e. not removing from memory as expected, and didn't happen in every case). So, the result is that things should be "better", especially in longer campaigns, more graphics used, more features used, etc.

Regards,
JPG

If that's the case, I'm likely to see a massive difference in my 20 month-old campaign. It'll be great to not have to reload FG midway through the session just to make things playable.



The improvement is broadly applicable. As these are memory leak fixes, they will not improve performance above the initial performance when the image is loaded. However, it should prevent the performance from degrading over time.

Ya, I wouldn't have expected things to improve past baseline. I suppose I was just trying put into perspective how much impact addressing the leaks would be. I've had large, high-definition maps with LoS, lighting, stamps, effect layers, etc. work fine for awhile and then performance would fall off a cliff to the point that my players sometimes couldn't even move their tokens, at all.

At any rate, thank you for working on the issue. The improvements in performance are going to make the user-experience much better for a lot of people.

ShadowedHand
September 22nd, 2023, 02:20
Thanks for your patience, uMike. I didn't find anything particular to the map in question. However, we've uncovered a few memory leaks with images that have been patched and could be affecting performance on your maps. The fixes should be in the next release.

Have you been patching memory leaks a lot over the last month or more? I ask because starting in September, we noticed a huge improvement to stability over previous weeks.

It was the first time since version 4.4 that we haven't had to constantly close and re-open the maps or restart the session multiple times a night, and we were using a maps with lots of tokens and detail which typically bogs things down. Lately its its been going smoothly no mater what we threw at the map.

pindercarl
September 22nd, 2023, 02:25
Have you been patching memory leaks a lot over the last month or more? I ask because starting in September, we noticed a huge improvement to stability over previous weeks.

It was the first time since version 4.4 that we haven't had to constantly close and re-open the maps or restart the session multiple times a night, and we were using a maps with lots of tokens and detail which typically bogs things down. Lately its its been going smoothly no mater what we threw at the map.

Glad to hear things have improved for you. These changes aren't the only memory leak fixes recently, but I can't say for certain which releases have included fixes without digging through the commit logs. I hope things continue to improve with the next release.

Moon Wizard
September 22nd, 2023, 06:03
The recent changes that @pindercarl has patched recently have not been released yet; and just entered beta testing today in the Test channel.

I don't know of anything specific in September that would have helped; but we have been trying to streamline some of the ruleset code to make it more standardized and a little faster. Maybe it's a case of every little bit adds up...

Hopefully, the changes in the Test channel will help even more.

Regards,
JPG

uMike
October 26th, 2023, 00:26
Last night we had our first session of the Skull & Shackles game since the big patch. We had NO issues with token movement. I hope that's indicative of all the changes solving the problem I was having. Very happy to have a smooth session last night.

Thanks for the help!

~uMike