X trapezoids rendering performance

Stefano Fedrigo aleph at develer.com
Tue Aug 21 19:53:34 EDT 2007


Bernardo Innocenti wrote:
 > This patch is likely to make a big difference in the EXA codepath
 > I benchmarked, which is heavily used by the OLPC GTK theme.
 >
 > The mini-benchmark attached to #1837 mimics it by drawing rounded
 > edges shapes with Cairo.
 > [...]
 > -------- Original Message --------
 > Subject: [PATCH] Avoid an unwanted pixmap migration in EXA when
 > compositing trapezoids
 > Date: Wed, 15 Aug 2007 19:58:56 +0200
 > From: Fredrik Höglund <fredrik at kde.org>

I made quite some testing with the attached benchmark: I tried with a few
different configurations (24 and 16 bit display, different snapshots of
xserver 1.4): speed increase is consistently at 30%.
Definitely not bad, and the patch is already committed in the server-1.4-branch.
Looking at oprofile output is evident that the main optimization is avoiding
memcpy'ing the pixmaps.

Benchmark result without the patch (16 bpp):
   op: rect
user: 2.600
  sys: 0.050
real: 7.930
op/s: 126.103

Oprofile report:

   samples|      %|
------------------
       534 56.8085 Xorg
	          TIMER:0|
	  samples|      %|
	------------------
	      243 45.5056 libc-2.6.so
	      211 39.5131 libpixman-1.so.0.9.4
	       38  7.1161 amd_drv.so
	       17  3.1835 libexa.so
	       16  2.9963 Xorg
	        8  1.4981 libfb.so
	        1  0.1873 libextmod.so
	[...]

samples  %        linenr info                 image name               app name      symbol name
225      23.9362  (no location information)   libc-2.6.so              Xorg          memcpy
213      22.6596  (no location information)   libcairo.so.2.11.5       python        (no symbols)
168      17.8723  pixman-edge.c:322           libpixman-1.so.0.9.4     Xorg          pixman_rasterize_edges
63        6.7021  (no location information)   no-vmlinux               no-vmlinux    (no symbols)
56        5.9574  (no location information)   libpython2.5.so.1.0      python        (no symbols)
19        2.0213  cim_gp.c:3305               amd_drv.so               Xorg          gp_wait_until_idle
16        1.7021  (no location information)   libc-2.6.so              python        msort_with_tmp
12        1.2766  pixman-mmx.c:0              libpixman-1.so.0.9.4     Xorg          __divdi3
11        1.1702  cim_gp.c:1228               amd_drv.so               Xorg          gp_color_bitmap_to_screen_blt


** With the patch applied:

   op: rect
user: 2.550
  sys: 0.020
real: 6.070
op/s: 164.745

   samples|      %|
------------------
       709 47.1096 Xorg
                   TIMER:0|
           samples|      %|
         ------------------
               511 72.0733 libpixman-1.so.0.9.4
                71 10.0141 amd_drv.so
                43  6.0649 Xorg
                40  5.6417 libexa.so
                36  5.0776 libc-2.6.so
                 7  0.9873 libfb.so
                 1  0.1410 librt-2.6.so
	[...]

samples  %      linenr info                 image name               app name     symbol name
407    27.0432  (no location information)   libcairo.so.2.11.5       python       (no symbols)
322    21.3953  pixman-edge.c:322           libpixman-1.so.0.9.4     Xorg         pixman_rasterize_edges
130     8.6379  (no location information)   no-vmlinux               no-vmlinux   (no symbols)
103     6.8439  (no location information)   libpython2.5.so.1.0      python       (no symbols)
90      5.9801  pixman-utils.c:165          libpixman-1.so.0.9.4     Xorg         pixman_fill
40      2.6578  (no location information)   libc-2.6.so              python       msort_with_tmp
32      2.1262  cim_gp.c:1228               amd_drv.so               Xorg         gp_color_bitmap_to_screen_blt
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bench.py
Type: text/x-python
Size: 1543 bytes
Desc: not available
URL: <http://lists.laptop.org/pipermail/devel/attachments/20070822/83444c08/attachment.py>


More information about the Devel mailing list