Last Comment Bug 435739 - Poor performance of Firefox 3 with no X RENDER extension
: Poor performance of Firefox 3 with no X RENDER extension
Status: RESOLVED FIXED
:
Product: Core Graveyard
Classification: Graveyard
Component: GFX: Gtk (show other bugs)
: Trunk
: x86 Solaris
: -- normal (vote)
: ---
Assigned To: Ginn Chen
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-05-26 03:32 PDT by Ginn Chen
Modified: 2009-01-22 10:17 PST (History)
3 users (show)
See Also:
QA Whiteboard:
Iteration: ---
Points: ---


Attachments
patch (3.79 KB, patch)
2008-05-26 03:47 PDT, Ginn Chen
vladimir: review+
Details | Diff | Splinter Review

Description Ginn Chen 2008-05-26 03:32:00 PDT
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.
Comment 1 Ginn Chen 2008-05-26 03:47:30 PDT
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.
Comment 2 Behdad Esfahbod 2008-05-26 08:47:56 PDT
Shouldn't Thebes use cairo_surface_create_similar instead?  That takes care of this bug.
Comment 3 Vladimir Vukicevic [:vlad] [:vladv] 2008-05-26 12:05:56 PDT
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.
Comment 4 Ginn Chen 2008-06-11 03:35:43 PDT
Pushed to mozilla-central in changeset:
http://hg.mozilla.org/mozilla-central/index.cgi/rev/694a9a4d6dcf

Note You need to log in before you can comment on or make changes to this bug.