3 ms·
> sluggish as hell on Chrome Linux and butter-smooth on Firefox: https://stripe.com/docs/api https://stripe.com/docs/api Hi; I work on scrolling/rendering in C
by smcgruer 9y ago
> sluggish as hell on Chrome Linux and butter-smooth on Firefox: https://stripe.com/docs/api https://stripe.com/docs/api
Hi; I work on scrolling/rendering in Chrome. Thanks for bringing this to my attention, that is some super janky scrolling in Chrome >_<. I've filed http://crbug.com/786991 http://crbug.com/786991 for us to look into it.
Some technical background (since this is HN after all); at a quick glance there are two things going wrong here in Chrome.
1. We would normally want to 'composite' the scrolling region here, which means we paint the pixels only once into a saved layer and then just slide that up and down as you scroll. I believe that is not happening on the Stripe page because of the unusual way that they are doing the split-panel background. Looks like we're currently unable to tell that the background is an opaque color, so we can't apply sub-pixel font AA[0] - and on low DPI we will refuse to composite in that case.
2. Chrome's repainting of this page is really slow. :(. Firefox Nightly is also repainting the page when you scroll (as far as I can tell), but they're definitely doing it much faster than Chrome!
So our goal will be to try and figure out how to composite this page, and if that's not possible then we'll have to dig into the slow painting.
Note: Because we composite more readily on high DPI devices (where sub-pixel font AA[0] doesn't matter), this site should scroll nice and fast on a high resolution display. This includes most new laptops, all (?) phones/tablets, etc.
[0]: https://en.wikipedia.org/wiki/Subpixel_rendering https://en.wikipedia.org/wiki/Subpixel_rendering
- scrollaway 9y agoThanks a lot for the insight! Really cool to see a reply straight from the horse's mouth :) > Note: Because we composite more readily on high DPI devices (where sub-pixel font AA[0] doesn't matter), this site should scroll nice and fast on a high resolution display. This includes most new laptops, all (?) phones/tablets, etc. Not the case for me. Touchscreen display on a UX asus laptop, 3.2k resolution on linux with intel card. Scrolling using the touchscreen is snappy, scrolling using the scroll wheel (synaptics emulation) is even worse than on my desktop.
- ComputerGuru 9y agoI think it depends on what your DPI is set to. The resolution itself doesn’t necessarily mean much, but typically 3k+ resolutions are accompanied with > 96dpi configurations.
- ComputerGuru 9y agoOmg a Chrome developer using the word “subpixel aliasing” in real life! I have been looking for you! I’m about to go mad because I’ve been reporting bugs in subpixel aliasing under hi-dpi displays with non-standard DPIs (!= 96dpi) for a while but the Chromium QA team in India has been having a hard time triaging them, possibly because of the hi-dpi display requirement. I’ve also got a fully reproducible issue involving CSS transforms I haven’t bugged yet as I’ve just been struggling to get someone to triage #765848 correctly as of yet: https://bugs.chromium.org/p/chromium/issues/detail?id=765848 https://bugs.chromium.org/p/chromium/issues/detail?id=765848 Can you send me an email, pretty please? mqudsi [at] NeoSmart [dot] net I was experiencing this particular bug on all my hi-dpi machines but it magically went away on one of them (perhaps after an OS update, as it’s running Windows 10 RS4 seeds) but it’s fully reproducible on all my other machines with a clean profile on all channels.