PDA

View Full Version : Lag When Applying Effects



rocketvaultgames
April 3rd, 2025, 21:51
Question:

How does the total number of actors in the CT matter for how long it takes to apply an effect? How is FG 'caring' about all the actors that aren't even on maps, just in the CT?

Fresh campaign, no extensions.


6 Characters in the CT and on a map.
Have 1 character target all 5 others
Drag/drop an effect from PC Action tab to chat
Effect is applied to all 5 (seemingly instantly, but obviously a small lag spike) 63974
Delete the effects from all




Add 300 npcs to the CT, no tokens on maps
Have 1 character target all 5 others
Drag/drop an effect from PC Action tab to chat
Effect is applied to all 5 (after a significant lag spike) 63975



How/why does FG care about these other actors? I'd love to eliminate this lag spike on applying effects.

Obviously 300 is a lot... but it seems that simply the more there are the worse it is, and I'd like to understand why to hopefully find a way to prevent it.


(The underlying reason is to use Aura effects to apply/remove a lot of effects from a lot of actors during token movement as quickly as possible. There is essentially no lag with even a lot of complex effects being added/removed with few actors in the CT... but having more actors in the CT (even not on maps) makes this progressively worse to the point where GM (without players connected) has very bad lag, and the movement is impossible with players connected.)

I appreciate any insight.

Thank you.

Moon Wizard
April 3rd, 2025, 22:45
If you are using any extensions (especially Aura effects), this can have a drastic effect on applying effects to tokens on a map, since the effects have to check interactions with all other effects. This is one of the primary reasons why I haven't attempted to add aura effects yet; until Carl or I can come up with a more performant solution.

By default, there are already calls to reset vision/lights based on effect changes; so you could be seeing this impact as well.

Regards,
JPG

rocketvaultgames
April 4th, 2025, 00:10
If you are using any extensions (especially Aura effects), this can have a drastic effect on applying effects to tokens on a map, since the effects have to check interactions with all other effects. This is one of the primary reasons why I haven't attempted to add aura effects yet; until Carl or I can come up with a more performant solution.

By default, there are already calls to reset vision/lights based on effect changes; so you could be seeing this impact as well.

Regards,
JPG

Forget I said anything about auras...

Question:

How does the total number of actors in the CT matter for how long it takes to apply an effect? How is FG 'caring' about all the actors that aren't even on maps, just in the CT?

Fresh campaign, no extensions.

6 Characters in the CT and on a map.
Have 1 character target all 5 others
Drag/drop an effect from PC Action tab to chat
Effect is applied to all 5 (seemingly instantly, but obviously a small lag spike) Screenshot 2025-04-03 154023.png
Delete the effects from all



Add 300 npcs to the CT, no tokens on maps
Have 1 character target all 5 others
Drag/drop an effect from PC Action tab to chat
Effect is applied to all 5 (after a significant lag spike) Screenshot 2025-04-03 154516.png



How/why does FG care about these other actors? I'd love to eliminate this lag spike on applying effects.

Obviously 300 is a lot... but it seems that simply the more there are the worse it is (even if they don't have any effects on them and aren't on maps), and I'd like to understand why to hopefully find a way to prevent it.

Moon Wizard
April 4th, 2025, 03:50
Because effects are checked for modifications that affect the tokens on the map (i.e. lighting/vision); the effects cause the token vision/lights to be updated whenever an effect is added to an actor. Any changed to lighting/vision causes FG to have to recalculate LoS for every token, as well as intra-token visibility.

Regards,
JPG

rocketvaultgames
April 4th, 2025, 03:55
Because effects are checked for modifications that affect the tokens on the map (i.e. lighting/vision); the effects cause the token vision/lights to be updated whenever an effect is added to an actor. Any changed to lighting/vision causes FG to have to recalculate LoS for every token, as well as intra-token visibility.

Regards,
JPG

Thank you for the reply...

So it is checking for lighting/vision for CT actors that aren't on maps and don't have any effects on them?

Moon Wizard
April 4th, 2025, 04:15
It has to check for every effect changed; and then determine whether the actor with the effect has a token to apply changes to.

The combat tracker and image with tokens are two separate data structures; so lookups have to be performed with any interactions involving tokens.

Regards,
JPG