Poor performance of Firefox 3 with no X RENDER extension

RESOLVED FIXED

Status

Core Graveyard
GFX: Gtk
RESOLVED FIXED
9 years ago
8 years ago

People

(Reporter: Ginn Chen, Assigned: Ginn Chen)

Tracking

Trunk
x86
Solaris

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

9 years ago
See also
http://bugs.freedesktop.org/show_bug.cgi?id=11529

With no X RENDER extension, the rendering of Firefox 3 is about 5-8 times slower than Firefox 2.

I have patches to improve the performance for both Firefox and Cairo code.

I'll post the Firefox part here.
(Assignee)

Comment 1

9 years ago
Created attachment 322503 [details] [diff] [review]
patch

Do not use gfxXlibSurface for images (offscreen surface) if we've no render.
Use gfxImageSurface instead.

The current code creates a pixmap and use it for gfxXlibSurface in this case.
It is harmful for performance.
Because when the image is being composite to a X drawable and we don't have RENDER, the fallback code in cairo will need to call XGetImage for the source image, and composite it as cairo image surface.
If we just use cairo image surface for offscreen surface, we will save a call of XGetImage.
If the image is huge (e.g. open a big jpeg file directly), the save is significant.
Assignee: nobody → ginn.chen
Status: NEW → ASSIGNED
Attachment #322503 - Flags: review?(vladimir)

Comment 2

9 years ago
Shouldn't Thebes use cairo_surface_create_similar instead?  That takes care of this bug.
Comment on attachment 322503 [details] [diff] [review]
patch

Hm, yeah, this looks ok.  We can't use create_similar because we have nothing to create_similar to at this pint.
Attachment #322503 - Flags: review?(vladimir) → review+
(Assignee)

Comment 4

9 years ago
Pushed to mozilla-central in changeset:
http://hg.mozilla.org/mozilla-central/index.cgi/rev/694a9a4d6dcf
Status: ASSIGNED → RESOLVED
Last Resolved: 9 years ago
Resolution: --- → FIXED
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.