-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Delayed entering of Fullscreen Mode as compared to Chrome #20384
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
cc: @iefremov @mkarolin There is a noticeable delay in going to full screen. @garygreen Sounds like you're seeing this consistently with multiple videos on YouTube? |
@rebron That's correct, it happens on every video. The delay can also be seen on other sites like https://vimeo.com/156942975 - however the difference isn't quite so profound as Youtube. |
@garygreen can you please share brave://gpu from Brave and chrome://gpu from chrome? |
@atuchin-m any ideas maybe? |
Turning Brave shields off definitely makes a noticeable improvement - it's down from roughly 1.5sec fullscreen to around 1sec fullscreen. Chrome is actually a big quicker than 1 sec opening. What happens during layout updates? I wonder if Brave Shields observe updates to the DOM and crawls through it causing layouts, reflows and other stuff when it mutates which could cause this slowdown when going into fullscreen? |
Could it possibly be due to the filtering of cosmetics? Maybe I'm digging in the wrong place, but looking at code it seems to observe for every mutation of the DOM, attributes, subtree and childnode modifications - then seems to call back to Rust for adblocking analysis? I assume that's an asynchronous operation? https://github.com/brave/brave-core/blob/f08ca55a6b3333c4e8e6af57b203ddc44f631a6f/components/cosmetic_filters/resources/data/content_cosmetic.ts When going fullscreen quite a lot of mutation observers are triggered. Again, I maybe barking up the wrong tree here, but just trying to wonder why turning Brave Shields off would have a positive improvement. |
@antonok-edm @ryanbr maybe you could take a look when you have some time |
@garygreen Yes, the MutationObservers are used for cosmetic filtering; they are important to catch new elements on the page that should be hidden by the adblock engine. From what I can tell, there are a significant number of modifications to the page layout when youtube enters fullscreen mode; so this is probably expected. If you look at Chrome + uBlock Origin I imagine the delay is approximately equal. uBO uses a similar approach to cosmetic filtering. You're always welcome to disable Shields if you find the delay unacceptable, of course with the tradeoff of seeing ads again. |
I use uBlock with Chrome and have zero delay issues with it... In brave it's quite hard to test if the cosmetic filtering is actually causing this delay or not, as there doesn't appear to be a way to simply disable cosmetic filtering in Brave? |
@garygreen That's good to know. For testing you can disable cosmetic filtering globally via the |
Experiencing this same issue as well. Tested with Firefox + uBlock Origin and it is much smoother compared to Brave + Shields. I will say that it isn't consistent to reproduce. Sometimes YT fullscreens fast and sometimes it is definitely slower than Chrome. It also seems to get worse when watching a long video for a long time, like this one: https://www.youtube.com/watch?v=8zxeGydXY98 |
Description
When going fullscreen on a Youtube video there is a noticeable 500ms (ish) delay as compared to Chrome
1sec on Chrome
1.5sec on Brave
This seems insignificant, but it's something that I personally noticed when trying out Brave as a long term Chrome user. There doesn't seem to be any reason why going fullscreen would be 33% ish slower on Brave on my machine as compared to Chrome? So I can only assume this is some kind of optimization issue, possibly lots of reflows/layouts going on causing the slowdown compare to Chrome.
Steps to Reproduce
Video Demonstration
chrome-brave-fullscreen-delay.mp4
Expected result:
Fullscreen mode should open and close in same amount of time and snappiness as Chrome.
Reproduces how often:
Every time
Brave version (brave://version info)
1.34.80 Chromium: 97.0.4692.71 (Official Build) (64-bit)
adefa7837d02a07a604c1e6eff0b3a09422ab88d-refs/branch-heads/4692@{#1247}
Windows 10 Version 21H1 (Build 19043.1415)
Other Additional Information:
Does the issue resolve itself when disabling Brave Shields?
Disabling Brave shields does improve it slightly, but still a delay
Does the issue resolve itself when disabling Brave Rewards?
No
The text was updated successfully, but these errors were encountered: