Sequencer Firefox Performance fixes
Sequencer Firefox Performance fixes
221 Replies
Alright so let me go through the high level reproduction steps:
1. Open up a game of Foundry in Firefox.
2. Add this effect to about however many tokens lag you, for me it's about a dozen:
https://raw.githubusercontent.com/fantasycalendar/FoundryVTT-Sequencer/next/module.json
Have ya tried this version?
It's the upcoming 3.0.0 version, should have some improvements, but I'm still open to hearing what you've found!
I'll pull it up again but I'll note that there's no prototype token persistence
Ah, fair
The main change I made was this:
this is the compiled js
I added everything related to
videos
it seems like Chrome does this automatically or something, it changes NOTHING for Chrome
but on Firefox when I have 10 effects it seems to make 10 corresponding videos and upload them to the GPU constantly which eventually strains the GPU when it's a large enough effect (over a MB in this case)The main problem with that is that if all of them share the same video, they all have the same playback
So if one is removed/paused/loops or needs have a different offset to its playback, that's not possible
hmm, understood I understand this isn't a general fix then, can you see if you reproduce this by pulling up Firefox though?
Firefox is generally terrible in foundry from what I know, due to it being largely out of sync with the chromium-verse
Pretty much everyone in the mothership recommends to play on anything but Firefox
Like, if you place multiple animated tiles on the scene, do you get the same issues?
Fair, I just realised that it was a Sequencer "bug" though once I tried reproducing in pure PIXI
here's what I tried initially
sorry for the length but the key stuff is that this DOESN'T reproduce the problem
and I realised it's not reproducing it because it's reusing the texture for every sprite
Indeed
even though it's making 100*5*5 sprites it doesn't really lag at all
yeah
Essentially, each video texture is a whole html video tag
and browser tabs can only generally handle a maximum of 70, that's the hard coded limit
but most can at most handle 5-10, depending on the underlying system and browser
well my player starts getting lag around that area (5-10) yeah and I think it's because it's a large texture
it's scaled down to the player token so it's unnecessarily high resolution
might be a good idea to request a scaled down version from the JB2A guys
yeah, I'll look into something like that
would you accept a fix if I were to PR one that still kept all the features of current Sequencer to cache textures in a way that plays nice with firefox? I imagine it'd help with the chrome video limit as well.
I can suggest my players not use Firefox but I imagine that'd annoy them