![]() Repainting on every flip instead of once for the input event is extremely pessimal.Ĭompare desktop FF to mobile FF, which is buttery smooth on hardware barely faster than a first generation netbook. Most of the time, one flip will be immediately followed by another. Unlike block scrolling, one input event triggers many frame flips.The situation with smooth scrolling is completely different. The current behavior is great for block-scrolling: it paints a minimum number of pixels and avoids wasting memory or power with extra buffers and copying. FF repaints the entire viewport on every frame. (see _flashing) With zoomed pages, it's even worse. With the way it is now, you can scroll 3 lines and get dropped frames because FF is synchronously painting tiny slivers on every frame. If tile size and render-ahead distance are tuned well, unrendered content only appears when the user scrolls quickly for a substantial distance, and 100% utilization of a single core is insufficient to keep up with the scroll rate. Mac, Windows, Linux, ChromeOS, Android, Fuchsia, Lacros. For smooth scrolling to work correctly, scrolled areas should be rendered outside the viewport so that scrolling is simply a blitting operation. If enabled, mousewheel and keyboard scrolls will scroll by a percentage of the scroller size and the default scroll animation is replaced with Impulse-style scroll animations. There's some experimental work started to use async panning and zooming in desktop Firefox but this is a big project that's just barely started, so it won't be ready to use anytime soon.ĭropping frames is incorrect. Mobile browsers (including Firefox for Android and Firefox OS) already use this style of async scrolling. (The downside is that if you scroll really fast, you can reach parts of the page that aren't painted yet and you'll just see blank space until the rendering and layout catches up.) This allows scrolling to remain smooth even when rendering is slow. Instead the browser pre-renders more of the page than is currently visible, and updates the painted area in the background as you scroll. OMTC alone can improve some things, but perhaps more importantly it will also enable future improvements like async panning, where scrolling doesn't wait for new sections of the page to be painted. OMTC is already enabled by default on Mac, Android, and Firefox OS, but not yet on Windows or Linux. The graphics team is actively working on this right now. However, you can try it out by setting the "" preference in about:config. This is not yet enabled on Windows because it causes some performance problems. Part of the solution is off-main-thread compositing (OMTC). The basic problem is that a lot of the code for scrolling and rendering web pages is still running on the main thread, which means that scrolling has to pause and stutter if some other code (like rendering or layout) is hogging the thread.
0 Comments
Leave a Reply. |