The X API Is About 15 Times Bigger Than Wayland
Phoronix: The X API Is About 15 Times Bigger Than Wayland
For those curious about the size of the X11 API in relation to Wayland, it's about fifteen times bigger...
It supports less functionality.
Less functionality = smaller
This article is a bit misleading.
There's probably a good argument to be made that Wayland can be(going forward) smaller and leaner than X is including the same features, or even adding in new features. But we aren't there yet.
Right now, it's simply a matter of Wayland does less, so it's smaller. X does more, so it's bigger.
How big is Xwayland, anyways?(I would assume it's not very large, but that misses the point) Wayland doesn't have the backward compatibility layer, its X which has the 'forward compatibility' layer, so to say. So by definition, X would have to be bigger.
A good bit of the difference is simply breaking up the functionality differently - X has API entry points for all the drawing routines, font handling, etc., though most modern apps don't use those. In the Wayland world, instead of baking that into the core API, you simply use complementary API's instead, such as Cairo, OpenGL, FreeType, FontConfig, etc. - for a direct functionality comparison you'd add all those to the Wayland count, but as they're modularized better they're easier to maintain and evolve as separate API's instead of hardcoded into the core like X11 did.
Originally Posted by halfmanhalfamazing
It would be possible to cut all the (almost) unused legacy stuff from X too; you would just have to call it X12 instead of X11...
But if we were doing a whole new, compatibility breaking, major release of X, such as X12, we'd want to take the opportunity to examine & redesign many other things about the protocol as well, not just dump the legacy calls. It would probably take some experimenting to figure out what works, and would need to be developed in parallel with X11 for a number of years, so that we didn't abandon all our existing users while designing for the future. In fact, it would probably be best to reduce confusion by not calling it X12 before it was ready, so people didn't think they could upgrade right away and get something better, but to develop it at first under a code name, perhaps the name of a town near the MIT campus where X was originally developed - maybe "Wayland"?
Originally Posted by JanC
Wayland is useless. Cairo is using XRender, which isn't supported by Wayland.
Originally Posted by alanc
Yes it is supported. This is what the XWayland project is all about. Eventually, Cairo and other libraries that rely on XRender will need to upgrade to OpenGL. This is a good thing as XRender is already dying off today, and OpenGL is a cross-platform standard. Having a single, cross-platform API is a much better design for developers.
Originally Posted by JS987
I don't know a whole lot about GPU driver development, but my guess is that eventually these API simplifications will make the closed-source AMD/nVidia drivers much more stable (once Wayland support actually happens). That would be awesome, because currently one of the biggest issues with Linux vs Window/Mac is poor driver support/performance on some hardware (I'm looking at you AMD).
Cairo's 'image' backend uses Pixman to do all the rendering - same as the server's software implementation of XRender.
Originally Posted by JS987
There is one key difference though: using image and uploading the result via SHM is typically quicker (often much quicker) than using XRender, either accelerated or not. The only platform where it's reliably not so is SNA on Intel, which still isn't the default.
Thanks for your insightful post though.
Nor has it encountered the real world, yet. Right now it's a "battle plan", and battle plans seldom survive encounter with the enemy. That's not to say that it's not worthwhile, and can be an improvement over X. It's just that a year or two down the road, Wayland will have its ugly warts and bits of bloat, though it will no doubt still be smaller than X.