-
-
Notifications
You must be signed in to change notification settings - Fork 552
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
DOM cleaning in long sessions: JS unset a lot of CSS? JS remove() "Browsers are smart enough" #2193
Comments
thank you @raingart! (and hope you like my edit) ...not?😅 @raingart
CSS:
vs. JS:
The question
Got a source? Else we could experiment / benchmark (comparing CPU & GPU over a long time):
( #1211; w3c/webextensions#506 )
Just an example. Sorry. (Besides it is always good if we have multiple/all parallel solution in store, to fail-over once any changes)
👍
thanks! the jsfiddle makes an ambient lightening test-case!
thanks for caring! ( Also: youtube/js&css/web-accessible/core.js Lines 71 to 75 in 0a7acbe
We can. (even if IF is faster than the DOM)
does it lead to imagine any simple Pull Requests, that one should/i could automate [with regex]?👍 @raingart |
display:none elements are practically free, engine treats them like code comments, manipulating DOM leads to costly repaint and will break when YT JS tries to do something depending on an element you removed. |
We could inject our CSS only at need and unset a lot of Youtube's CSS.
But would that really help as long as the sessions aren't 100 hours long?
And we have many display:none features (CSS) for example. So we could also remove* some elements with JS(, which might helped if the page actually ran for very long... (#1211 #1967) )
Can/does uBlock do any of this? @gorhill @Deathamns @chrisaljoudi -
*(Which could be undone at times, when saving a reference to the element's parent or neighbors )
)
The text was updated successfully, but these errors were encountered: