Linked by Thom Holwerda on Sat 28th Jun 2008 22:09 UTC, submitted by diegocg
X11, Window Managers "Maybe I'm just naive, but designing a graphics API such that all image data had to be sent over a socket to another process every time the image needed to be drawn seems like complete idiocy. Unfortunately, that is precisely what the X Window System forces a program to do, and exactly what Cairo does when drawing images in Linux - a full copy of the image data, send to another process, no less, every time it is drawn. One would think there would be some room for improvement. Unsurprisingly, others felt the same way about X, and decided to write an extension, Xlib Shm or XShm for short, that allows images to placed in a shared memory segment from which the X server reads which allows the program to avoid the memory copy. GTK already makes use of the XShm extension, and it seems like a good idea to see if Gecko couldn't do the same."
Permalink for comment 320562
To read all comments associated with this story, please click here.
RE[2]: Exaggerating
by STTS on Sun 29th Jun 2008 10:21 UTC in reply to "RE: Exaggerating"
STTS
Member since:
2005-07-06

Fedora 9 with all updates, redeon driver, AMD 3870, Phenom 9750

[storm@fast ~]$ x11perf -putimage500
x11perf - X11 performance program, version 1.5
The X.Org Foundation server version 10499902 on :0.0
from fast
Sun Jun 29 14:11:16 2008

Sync time adjustment is 0.0334 msecs.

2800 reps @ 2.0214 msec ( 495.0/sec): PutImage 500x500 square
2800 reps @ 1.9846 msec ( 504.0/sec): PutImage 500x500 square
2800 reps @ 1.9471 msec ( 514.0/sec): PutImage 500x500 square
2800 reps @ 1.9314 msec ( 518.0/sec): PutImage 500x500 square
2800 reps @ 1.9462 msec ( 514.0/sec): PutImage 500x500 square
14000 trep @ 1.9661 msec ( 509.0/sec): PutImage 500x500 square

[storm@fast ~]$ x11perf -shmput500
x11perf - X11 performance program, version 1.5
The X.Org Foundation server version 10499902 on :0.0
from fast
Sun Jun 29 14:12:17 2008

Sync time adjustment is 0.0305 msecs.

16000 reps @ 0.3851 msec ( 2600.0/sec): ShmPutImage 500x500 square
16000 reps @ 0.3684 msec ( 2710.0/sec): ShmPutImage 500x500 square
16000 reps @ 0.3661 msec ( 2730.0/sec): ShmPutImage 500x500 square
16000 reps @ 0.3684 msec ( 2710.0/sec): ShmPutImage 500x500 square
16000 reps @ 0.3680 msec ( 2720.0/sec): ShmPutImage 500x500 square
80000 trep @ 0.3712 msec ( 2690.0/sec): ShmPutImage 500x500 square

~5 times faster, not bad.

Reply Parent Score: 3