-
Notifications
You must be signed in to change notification settings - Fork 135
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
Performance - Intersection Observer? #2935
Comments
This would help with what >>91904180 is requesting:
|
Looks very helpful. For older browsers, we could write a polyfill. It wouldn't necessarily have to be a complete polyfill that does everything IntersectionObserver does, just the stuff we are using in the script. It might take the form of one or more utility functions that use IntersectionObserver if it's available, and do it the old way otherwise. |
Although since Firefox v55 is already pretty old, it might just be easier to drop support for versions older that it. We should check whether it made it into the various Firefox forks people use. |
Both WaterFox and PaleMoon added support in 2019 by the looks of it FWIW. Not sure which other "major" Firefox forks are out there that are worth worrying about. You know me and how I feel about bumping the minimum browser version (all for it). |
If that's the case, it should be safe to bump the minimum version as soon as someone writes the code for this, although if it happens before the Javascript rewrite is finished we may want to delay the release to combine it with that. If we get any complaints then we can look into polyfills. |
In the event that the minimum version of Firefox/Chrome get bumped up, I would assume that 4chan X could use
IntersectionObservers
to detect elements within the viewport or otherwise.The relatively recent blog post on the performance of the new GitHub home page reminded me of that time I was trying to determine the negative reflow/render effects on elements when applying my userstyle.
I've also noticed that default 4chan has added theThis got done, nevermind.lazyload
attribute to thumbnails. Not sure if the benefits would still work on elements rendered by 4chan X in a userscript manager.The text was updated successfully, but these errors were encountered: