Aedif / TokenVariants

GNU General Public License v3.0
17 stars 12 forks source link

Unknown Performance Issue - Delay - Lag #135

Open KonteiKeisei opened 10 months ago

KonteiKeisei commented 10 months ago

Not sure if this is a known quantity, or specific to me. Setup actor mappings with 4 compressed WEBP Images covering 4 states, Standard State, Combat State, Prone/Sneak, and Unconcious/Dead. image

Switching from Combat to Non Combat is Flawless and instant. Switching from any state to or from Prone/Sneak, or Unconcious/Dead leads to 10 seconds of the system just locking up and being unresponsive. No console errors are logged.

Module list: image

Example: https://github.com/Aedif/TokenVariants/assets/49371326/7818da93-eb5e-4250-a274-49017661cdb1

FoundryVTT Version 11.308 DnD5e Version: 2.3.1

KonteiKeisei commented 10 months ago

WEBP Image Size Comparison: image

Aedif commented 10 months ago

Image size should be irrelevant. I reproduced your setup but am not noticing any delays when togglign combat state or active effects.

Check whether this happens with TVA disabled, and with just TVA on.

KonteiKeisei commented 10 months ago

Sorry if i am misunderstanding, but TVA is the feature here. If TVA is disabled, i wouldnt be able to dynamically switch based on actor status, disposition etc.

Are you asking me to manually switch the art and see if there is a delay with TVA Disabled, via the Token filepicker?

Again, apologies if i am not getting a basic thing you are asking.

Aedif commented 10 months ago

I want you to make sure that it is the TVA causing the delay when toggling active effects. That's why I'd like you to disable it and then toggle them to see whether the delay still happens.

If the delay still happens it means its not the TVA's image swapping at fault.

If the delay disappears, then check if the delay happens when it's just TVA active. That would tell me if this is some sort of bad interaction between TVA and another module.

KonteiKeisei commented 10 months ago

Issue is resolved with TVA disabled:

https://github.com/Aedif/TokenVariants/assets/49371326/23d9ce20-5399-4606-a5af-c95d077c19d5

KonteiKeisei commented 10 months ago

Also, incase this is a thing. When TVA is called in this manner, could it be a cache size issue? My TVA static cache is at about 6k token images.

I think its unlikely, as the combat switch is so fast, but wanted to put it out there for your troubleshooting consideration.

Aedif commented 10 months ago

No the mappings do not perform cache searches so that's irrelevant. More likely than not it's a bad interaction with another module. Mind disabling everything besides TVA and libWrapper? If the delay still occurs then export your TVA settings and link them to me.

KonteiKeisei commented 10 months ago

Issue Persists with Just TVA and LIBWrapper token-variants-settings.txt

KonteiKeisei commented 10 months ago

If you require direct access to my instance, let me know. Especially considering you cant reproduct on your end. Happy to assist.

Aedif commented 10 months ago

Not at home at the moment. But if you export the actor and the TVA module setting I should be able to create a pretty much 1:1 reproduction

KonteiKeisei commented 10 months ago

Here is a Zip with Art, TVA Settings, ActorSettings, and Full Actor JSON: NaruaCombat.zip

Aedif commented 10 months ago

Hmm, I reproduced your exact settings and I still don't see any delay. I'm aedif on discord if you want to send me a link to your instance.

KonteiKeisei commented 10 months ago

KonteiKeisei

Link sent

KonteiKeisei commented 10 months ago

Update: Aedif identified the issue. it is related to updating the art across all tokens on all scenes for linked actors.

Example: unlinking the actor fixes this issue.

Fix if any is possible within current limitations is TBD.

Aedif commented 10 months ago

Enable the new setting and see if that helps: https://github.com/Aedif/TokenVariants/releases/tag/4.53.1

KonteiKeisei commented 10 months ago

Sorry for the delay, but OMG its beautiful.

Thanks! FIXED