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."
Thread beginning with comment 320547
To read all comments associated with this story, please click here.
Unix socket not that slow
by siride on Sun 29th Jun 2008 04:58 UTC
siride
Member since:
2006-01-02

Remember also that sending data over a Unix socket is not really as slow as people expect it to be. The cost of doing that versus setting up a shared memory region and all of the synchronization that that involves is probably not very significant. And that's why SHM isn't used that much. It just doesn't buy you a whole lot. It would be better to find better ways to send the right data and the right amount, to the server, instead of trying to figure out how to be able to send huge amounts of redundant data.

Reply Score: 8