💾 Archived View for gemini.circumlunar.space › users › kraileth › neunix › eerie › 2012 › toolkits_c… captured on 2022-06-11 at 21:40:08. Gemini links have been rewritten to link to archived content
⬅️ Previous capture (2020-10-31)
-=-=-=-=-=-=-
Here I'm republishing an old blog post of mine originally from October 2012. The article has been slightly improved.
We're going to examine 7 toolkits in just a minute after discussing how to deal with this topic. These 7 are:
Some people say that Linux is all about is choice. True or not: When it comes to toolkits, it's usually the programmers who have to make a choice. They have to check if a toolkit provides all the features they want and if they feel comfortable with its syntax and so on. However this blog entry is not about recommendations for programmers (there's probably enough material out there already).
From which perspective are we going to look at them, if not from a programmer's? Simple! From the perspective of a _distribution creator wannabe_! ;)
For a distro creator things are much easier here - he could decide at will or even decide _not_ to make a decision for one but support several (or all) available toolkits instead. There are reasons why this makes sense. Many modern systems combine for example Qt and GTK+ since the users often "mix" applications of both TKs. You like the well-known VLC? Then you have Qt on board. Using GIMP, too? Not without GTK+! Thanks to the theming ability, you usually won't even notice that your default applications relay on different toolkits.
However there's also a very good reason _not_ to provide several toolkits by default: They all use up valuable system resources! In the planing especially for a _light-weight_ distribution, it's an important aspect to make a decision towards one standard toolkit and package default applications which use this particular one.
It's not as easy as that in our case, though. There are lighter and heavier toolskits. Of course the lighter ones lack several features that the others provide. But even more importantly for us: There are huge differences in the number of applications available for each toolkit! Unfortunately it's the lightest TKs which have the lowest number of programs using them... So let's take a closer look at this post's topic!
As I said before, we won't examine the TKs in their technical aspects (or distinguish between toolkit, development framework, etc). Of course things like FOX not supporting themes can be very relevant when deciding on the right standard toolkit for our distro. But that's beyond the scope of this blog entry.
We're just going look at the various TKs in terms of how "heavy" the are. To do this, we compare the amount of drive space they need, how long they take to compile and how many dependencies they have. The first is done with the Arch Linux packages for the particular TK and the rest on a fresh Gentoo VM (emulating a single core 2.66 GHz pc with 2 GB ram and compiling with -j1) with just X11 installed. There are however a few things which make our comparison a bit difficult - for that reason I'll explain each toolkit on its own first and provide a table at the end of the post.
I thought about including Qt3, too, for a moment. Why? Well, it would have made a nice comparison on how much heavier Qt4 is and besides that, Trinity DE still uses it. But Qt5 is already on its way and so I decided to discard it.
Qt4 is one colossus of a TK! The Arch package (qt-4.8.2-3-i686.pkg.tar.xz) is _21.0 MB_ in size and _80.4 MB_ uncompressed!
It's so huge that it was split into smaller packages on Gentoo (qt-script, qt-bearer, qt-sql, qt-xmlpatterns, qt-opengl, qt-core, qt-phonon, qt-test, qt-declarative, qt-demo, qt-mobility, qt-qt3support, qt-svg, qt-dbus, qt-multimedia, qt-webkit, qt-openvg, qt-assistand, qt-gui). __115__ packages have to be compiled and installed and __386 MB__ downloaded from the net to do this! The source code for Qt alone (qt-everywhere-opensource-src-4.8.2.tar.gz) is a whooping __234 MB__ in size; the total compilation process takes __3:20:45__ of which Qt alone takes __2:32:14__!
GTK+3 is not actually a stand-alone TK but in fact extends and as such depends on the older GTK+2.
The Arch package (gtk3-3.2.3-3-i686.pkg.tar.xz) is __6.6 MB__ in size (together with GTK+2: __13.3 MB__) and uncompressed it needs __51.5__ MB (together with GTK+2: __106__ MB).
Building it on Gentoo means compiling and installing __89__ packages whose source code is __132 MB__ in size of which the GTK+3 source makes up __12 MB__ (together with GTK+2: __24.6 MB__. Compiling takes __45:51__ minutes of which __5:37__ are for compiling GTK+3 (together with GTK+2: __11:27__ minutes).
The Arch package for GTK+2 (gtk2-2.24.10-3-i686.pkg.tar.xz) is __6.7 MB__ in size and __54.4 MB__ uncompressed.
To install it on Gentoo, __88__ packages have to be built and __120 MB__ of sources downloaded. GTK+2 source code makes up __12.6 MB__ of that. Compiling the whole thing takes __40:00__ minutes and GTK+2 alone takes __5:50__ minutes.
GNUstep, being written in the Objective-C language, has the disadvantage that the whole GCC needs to be recompiled with OBJ-C enabled on Gentoo. This is of course a very big factor, but while I wanted to mention it, I'll subtract the GCC recompile on the comparison for the sake of comparability.
GNUstep consists of several packages by default. The Arch packages (gnustep-back-0.22.0-3-i686.pkg.tar.xz, gnustep-base-1.24.0-3-i686.pkg.tar.xz, gnustep-gui-0.22.0-3-i686.pkg.tar.xz, gnustep-make-2.6.2-2-any.pkg.tar.xz) are together __3.9 MB__ in size and __16.7 MB__ uncompressed.
Building on Gentoo means installing __93__ packages for which __206 MB__ of source code needs to be downloaded (including GCC recompile) or __92__ packages, __141__ MB in size (without GCC recompile). The packages (gnustep-base-1.24.0.tar.gz, gnustep-gui-0.22.0.tar.gz, gnustep-make-2.6.2.tar.gz, gnustep-back-0.22.0.tar.gz) are __7,0 M__B in size. Compiling takes __1:27:13__ (including GCC recompile), __43:51__ minutes (without it) and __4:22__ minutes for GNUstep alone.
The Arch package for FOX (fox-1.6.40-1-i686.pkg.tar.xz) is __3.9 MB__ in size and __13.8__ MB uncompressed.
Building it on Gentoo means compiling __6__ packages whose source is __5.0 MB__ in size of which FOX's source code makes up for __4.3 MB__. Compiling it all takes __5:59__ minutes and FOX alone takes __4:49__ minutes.
OpenMotif's Arch package (openmotif-2.3.3-2-i686.pkg.tar.xz) is __3.3 MB__ in size and __10.3 MB__ uncompressed.
Installing it on Gentoo means building __4__ packages for which __6.7 MB__ of source code has do be downloaded, __5.9 MB__ of source for OpenMotif alone. Building it takes __3:29__ minutes while OpenMotif alone takes __2:58__ minutes.
FLTK (pronounced "fulltick") is a very light toolkit. Its Arch package (fltk-1.3.0-3-i686.pkg.tar.xz) is just __1.0 MB__ in size and uncompressed it only takes __4.7 MB__ of space.
To install it on Gentoo, __7__ packages have to be built, which needs __7.2 MB__ of source code downloaded from the net, __4.0 MB__ of which is for FLTK's source. Building only takes __2:42__ mintes and for FLTK alone it's as little as __1:04__ minutes!
Toolkit (Arch) size (Gentoo) pkgs / src size Build time (h:m:s) FLTK 1.0 / 4.7 7 pkgs 7.2 / 4.0 0:02:42 / 0:01:04 OpenMotif 3.3 / 10.3 4 pkgs 6.7 / 5.9 0:03:29 / 0:02:58 FOX 3.9 / 13.8 6 pkgs 5.0 / 4.3 0:05:59 / 0:04:49 GNUstep* 3.9 / 16.7 92 pkgs 141 / 7 0:43:51 / 0:04:22 GTK+2 6.7 / 54.4 88 pkgs 120 / 12.6 0:40:00 / 0:05:50 GTK+3** 13.3 / 106 89 pkgs 132 / 24.6 0:45:51 / 0:11:27 Qt4 21.0 / 80.4 115 pkgs 386 / 234 3:20:45 / 2:32:14 All sizes in MB.
The winner and most light-weight toolkit is easily __FLTK__. It has the smallest installed size, smallest source and shortest compilation time, both including dependencies and on its own. Only in the number of dependencies it's beaten by __OpenMotif__ and __FOX__ which are quite light-weight in the other aspects, too. With __GNUstep__ things become a lot more heavy and __GTK+__ or __Qt__ are of course full-blown toolkits which provide about every feature you'd need but are also very bloated.
We'll drop FOX and GNUstep from now on, since there's no working desktop environment using them at the moment (There's a project to create a FOX DE, but it seems to be inactive since 2005 and Ètoilè (GNUstep) is a mess right now) which makes them irrelevant for our purpose. There was of course some value in adding them to this comparison, though.