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 320560
To read all comments associated with this story, please click here.
Define "Slow"
by Lousewort on Sun 29th Jun 2008 10:00 UTC
Member since:

The OP has the wrong end of the stick.

We have a home grown socket based inter-application middleware that manages over 30000 messages per second between processes on the same machine. I hardly call that slow...

We use cairo for cross platform graphing. Win32 GDI using cairo on XP is quite a bit slower in rendering and screen update than X. While I realise that might be due to the Win32 backend, it is also possible that it is due to the GDI.

Bottom line is that Shm, which has been around since 1991, is not used because it is not needed. Using it instead of sockets would break the ability for your app to work across the network.

The cairo toolkit is extremely efficient. If you see FF taking some time to render pages, rather point a few fingers at your internet speed, or the speed of the site being rendered.

Reply Score: 3