Closed Askejm closed 2 months ago
Hi @Askejm, let's try to figure out what caused the sudden drop in performance. I'm on a Nvidia 2070 Super, so I might be able to reproduce your issue. Some follow up questions:
Since it happens only on Firefox, Do you think it could have happend because of a Firefox update?
Which Nvidia driver version are you currently on? And were you on?
Could you try to see if reverting to the previous NVidia driver does indeed fix the problem? Or using the previous Firefox version?
Thanks for the quick response @WesselKroos
It looks like you've found a Firefox version 123 bug. I hit the same framerate ~12 fps limit for a 4K video in Firefox. But after downgrading to Firefox 122 I was able to get 60fps.
I don't have a workaround for you at this moment. But I'll report this performance regression to the Firefox developers. Let's hope we can find a workaround for Firefox 123 in the mean time.
Running Firefox versions 122 and 123 side-by-side:
Oh thats odd. Well ill downgrade then, thanks!
The bug has been reported to the Firefox developers: https://bugzilla.mozilla.org/show_bug.cgi?id=1883225
@Askejm I think I found a workaround. Could you verify that executing this javascript code on the /watch page fixes the bug in Firefox 123? (Tip: You can install Firefox 122 and 123 in separate locations to run them side-by-side)
ambientlight.enableMozillaBugReadPixelsWorkaround = false
Because it looks like they have fixed bug 1719154 while introducing bug 1883225
@WesselKroos Looks like that did it.
Still looks a little bumpy on the graph it appears, but it seems fine to me
Sorry, heres the full stats
Then I'll turn off that workaround from Firefox 123. I'll also make the workaround available via an advanced setting. Just in case Firefox decides to revert their change in 124.
Then I'll turn off that workaround from Firefox 123. I'll also make the workaround available via an advanced setting. Just in case Firefox decides to revert their change in 124.
Did you push this update? I still get bad fps without running the javascript. Version 2.38.1 @WesselKroos
@Askejm Not yet, it will be released in 2.38.2.
@WesselKroos Looks like that did it.
Still looks a little bumpy on the graph it appears, but it seems fine to me
Those are some large consistent spikes, more than 2x the normal duration.
My graph seems to be a lot smoother:
Even when Firefox's rendering process is a half display frame desynced from the video frame (this alternates every 5 seconds on my pc), the duration (drawtime) stays similar for every frame:
Could you share a recording of the Graphics process for 10 seconds?
You can follow the steps in Firefox's profiler documentation to create one. Just select "Graphics" instead of "Firefox" in the popup: https://profiler.firefox.com/
Dont know why but its a lot better now
Most of the stutters are just caused by changes on the webpage that the YouTube design has to recalculate things for.
For some you can reduce the duration. Because all 3 microstutters are partially caused by your Bitwarden extension. It is executing a getPageDetails
and fulfilled
function (for 95ms + 22ms) in intervals. And a CollectAutofillContentService/this.handleMutationObserverMutation
function (for 37ms) when anything changes on the webpage. I can't see what html content it is checking (and I don't want to know), but the function names sounds like an auto-fill feature. Maybe you can turn this feature off in Bitwarden's extension settings. Or you could only disable the extension on the youtube.com domain.
Stutter 1
Stutter 2
Stutter 3
Oh thanks i didnt know autofill would take so much. Thanks for the help! And ill be waiting for firefox v125 or 2.38.2!
@Askejm I noticed that Firefox released version 125. Can you confirm that Mozilla has fixed the bug?
@WesselKroos Yes works all good now
Troubleshooter First try all the checks and steps in the troubleshooter: https://github.com/WesselKroos/youtube-ambilight/blob/master/TROUBLESHOOT.md
Describe the performance you are currently experiencing
Device information
Screenshots
Describe any workaround you've tried so far
Additional context Add any other context or screenshots about the feature request here.