Closed Bug 361236 Opened 18 years ago Closed 13 years ago

Optimize scrolling against position:fixed backgrounds that are Nx1

Categories

(Core :: Graphics, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED WONTFIX

People

(Reporter: simon.thum, Unassigned)

References

Details

(Keywords: perf)

User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.8) Gecko/20061025 Firefox/1.5.0.8
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.8) Gecko/20061025 Firefox/1.5.0.8

Some pages have a fixed background image specified (in CSS). Various bugs are related to sluggish performance on such pages, and I saw it in every Firefox up to 2.0.
Even if their specific causes are fixed, scrolling with a fixed background is still a more complicated task to perform. To help this, I'd like to suggest the following:

Many pages have background images with size around 1000x1. Such pages are then subject to slow scrolling without the need for it: Because the background repeats in one line, one could use the usual way of scrolling as when background moves with the view.

Generally, if the amount of pixels to scroll in some direction modulo the fixed-bg-dimension is zero and the bg repeats (in that direction), then re-rendering the full view is superfluous.

I'd also welcome an option to snap the view in such cases in order to fully exploit that optimization. This apparently only makes sense if the bg-image has  at least one very low dimension. But IMHO, this is a lot of pages.


Reproducible: Always
See bug 90198 for general problems with slow scrolling on fixed backgrounds (for various reasons).
How common are fixed, repeated, tiny background images?  Most of the fixed backgrounds I encounter are large images.
Keywords: perf
As I stressed out they are quite common since you can use them to do gradients in the background. Usually they are then constained to one line in order to save bytes. People fix them to have the screen look steady and not have wraparounds in view.
I know pepople who wanted this but dumped it because of FF perf, so maybe there is some chicken/egg too.
I don'h have numbers, though.
Product: Firefox → Core
QA Contact: general → general
Summary: Suggesting simple optimization → Optimize scrolling against position:fixed backgrounds that are Nx1
Blocks: 90198
Status: UNCONFIRMED → NEW
Component: General → Graphics
Ever confirmed: true
QA Contact: general → thebes
The landing of retained layers should have fixed most (if not all) of the fixed background performance issues.

I'm going to close this as WONTFIX for now, please re-open if it's still a big issue.
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.