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 320561
To read all comments associated with this story, please click here.
RE[3]: Exaggerating
by FooBarWidget on Sun 29th Jun 2008 10:20 UTC in reply to "RE[2]: Exaggerating"
Member since:

That's how things should work on a sane local graphic setup, but X is far from being "sane". Yes, IS efficient and comparable to other systems, but only because people have spent a lot of time workarounding the stupid things it does so that at the end in local systems it works like other sane systems.

How is any of this "stupid"? Isn't that exactly how most software is supposed to be engineered? What do you expect from them? That shared memory somehow magically works over the network? What kind of answer would satisfy you?

That's the funny thing: X is supposed to be "network transparent", but then the server and the client need to DETECT if they're in "local mode", or if such extension is enabled or not, and make SPECIAL MODIFICATIONS to the code paths so that it works right.

No they don't. "Transparent" means that you don't *have* to do that. Even if you don't use the special modifications, things will still work. It's just that if you do use the special modifications, then things will be more efficient.

Really, what more do you want? It seems that no matter what solution is given, you will never be satisfied until X doesn't work over the network at all. While that may be less "stupid" in your eyes, it'll actually be a step backwards, because then all your apps are still working on the same speed, *and* they don't work on the network anymore.

Reply Parent Score: 11