[Gllug] Thoughts on the breadth of Free Software

Nix nix at esperi.org.uk
Tue Sep 19 21:44:07 UTC 2006


On Mon, 18 Sep 2006, Tethys mused:
> Nix writes:
>>You appear to be suffering under the misapprehension that Konqueror is a
>>web browser.
> 
> Oh no, I'm well aware that Konqueror is more than just a web browser,
> but it's just that I'm not remotely interested in those aspects of it.
> In principle, the base package could be pretty minimal, and the web
> browser, file browser and kitchen sink components could be packaged
> as extras that konq could use if installed or skip if they're not
> present.

In theory, yes (although the file manager isn't a `component' in the
sense of a DCOP-communicating separate piece).

>          But no one's interested in writing lean software these days.

Well, it's more that since we *have* kdelibs, and kdelibs lets us do
the extra things Konqueror does for pretty much zero cost, why not?

> The prevailing attitude seems to be to just throw everything in, and
> that same mentality is being applied to packaging.

Konqueror's actually very lean as web browsers go:

  RSS    VSZ COMMAND
26120  43900 konqueror -session 10db616465000115593425000000076830008_1158504359_977873
59632 139872 konqueror -session 10db616465000115782957900000024540081_1158504360_101392
36388 117060 konqueror http://feeds.feedburner.com/~r/scienceblogs/pharyngula/~3/23981283/its_the_only_brand_a_true_pira.php

That first instance is a file manager with half a dozen tabs. The second
instance is a web browser with a dozen, and the third a web browser with
only one.

Oh, and nearly all that RSS and VSZ is shared: we have about a 70Mb hit
per browser.

Compared to e.g. firefox, that is *small*, although it's true that on
memory-constrained boxes, I use links 2.1pre in graphical mode. *That*
is trim, but it doesn't do a lot of what Konq does (no cookies, for
starters, and JS is very limited).

>>It's half a web browser and half a file manager and `universal
>>viewing application', and makes extensive use of most of kdelibs
>>and big hunks of kdecore.
> 
> Yes, but how extensive is that use for just browsing the web? Sure,

Quite heavily used, actually: KIO is in constant use, and whenever you
click on a PDF, DCOP and a pile of related infrastructure gets
used. (Plus the Qt core, kdecore, and kdeui are in use all the time.
arts and kdefx less so.)

> it'll make use of bits and pieces here and there, but I doubt it needs
> as much as it seems to.

Don't confuse size on disk with resident size. They're quite different.

See e.g. <http://ktown.kde.org/~seli/memory/>. Note how KDE and GNOME
seem to lose until you actually start doing a lot, whereupon the need
of the non-integrated apps to roll their own wheels suddenly causes
the `trim' WindowMaker environment to eat rather a lot more memory
than the integrated environments do.

>>There are other browsers based on KHTML (Safari and something on Nokia
>>smartphones, plus *many* other parts of KDE use KHTML themselves while
>>not being full-blown browsers)
> 
> Yes, but I want a full KHTML based browser on the Linux desktop, without
> all of the other crap that goes with Konqueror. It saddens me that such
> a beast doesn't seem to exist (although I suspect that if the problem
> couldn't be solved completely, the situation could at least be improved
> with more intelligent packaging[1]).

Well, maybe, maybe not. Here's a list of my running Konqueror's
non-anonymous shared-library mappings on my system (with stow-related
path components excised with a little seddery):

/lib/ld-2.4.so
/lib/libc-2.4.so
/lib/libdl-2.4.so
/lib/libgcc_s.so.1
/lib/libm-2.4.so
/lib/libnss_files-2.4.so
/lib/libpthread-2.4.so
/usr/lib/Qt/plugins/imageformats/libqmng.so
/usr/lib/libqt-mt.so.3.3.6
/usr/lib/libacl.so.1.1.0
/usr/lib/libattr.so.1.1.0
/usr/lib/libexpat.so.1.5.0
/usr/lib/libfontconfig.so.1.0.4
/usr/lib/libfreetype.so.6.3.10
/usr/lib/libfam.so.0.0.0
/usr/lib/libstdc++.so.6.0.8
/usr/lib/kde3/libakregatorkonqfeedicon.so
/usr/lib/kde3/libakregatorkonqplugin.so
/usr/lib/kde3/libarkplugin.so
/usr/lib/kde3/libbabelfishplugin.so
/usr/lib/kde3/libcrashesplugin.so
/usr/lib/kde3/libdomtreeviewerplugin.so
/usr/lib/kde3/libkhtmlsettingsplugin.so
/usr/lib/kde3/libkuickplugin.so
/usr/lib/kde3/libmfkonqmficon.so
/usr/lib/kde3/libminitoolsplugin.so
/usr/lib/kde3/librellinksplugin.so
/usr/lib/kde3/libsearchbarplugin.so
/usr/lib/kde3/libuachangerplugin.so
/usr/lib/kde3/libwebarchiverplugin.so
/usr/bin/konqueror
/usr/lib/kde3/kcm_filetypes.so
/usr/lib/kde3/kcm_history.so
/usr/lib/kde3/kcm_konq.so
/usr/lib/kde3/kcm_konqhtml.so
/usr/lib/kde3/kcm_kurifilt.so
/usr/lib/kde3/kcm_performance.so
/usr/lib/kde3/libkhtmlkttsdplugin.so
/usr/lib/kde3/libkshorturifilter.so
/usr/lib/kde3/libkuriikwsfilter.so
/usr/lib/kde3/libkurisearchfilter.so
/usr/lib/kde3/liblocaldomainurifilter.so
/usr/lib/libkdeinit_konqueror.so
/usr/lib/libkonq.so.4.2.0
/usr/lib/kde3/libkpdfpart.so
/usr/lib/kde3/khtmlimagepart.so
/usr/lib/kde3/libkhtmlpart.so
/usr/lib/kde3/plugins/styles/keramik.so
/usr/lib/libDCOP.so.4.2.0
/usr/lib/libkdecore.so.4.2.0
/usr/lib/libkdefx.so.4.2.0
/usr/lib/libkdeprint.so.4.2.0
/usr/lib/libkdesu.so.4.2.0
/usr/lib/libkdeui.so.4.2.0
/usr/lib/libkhtml.so.4.2.0
/usr/lib/libkimproxy.so.0.0.0
/usr/lib/libkio.so.4.2.0
/usr/lib/libkjs.so.1.2.0
/usr/lib/libkparts.so.2.1.0
/usr/lib/libkutils.so.1.2.0
/usr/lib/libkwalletclient.so.1.0.1
/usr/lib/kde3/khtml_kget.so
/usr/lib/libart_lgpl_2.so.2.3.17
/usr/lib/liblcms.so.1.0.15
/usr/lib/libidn.so.11.5.19
/usr/lib/libjpeg.so.62.0.0
/usr/lib/libmng.so.1.0.0
/usr/lib/libpng12.so.0.12.0
/usr/lib/libaudio.so.2.4
/usr/lib/libpcre.so.0.0.1
/usr/lib/libICE.so.6.3.0
/usr/lib/libSM.so.6.0.0
/usr/lib/X11/locale/common/ximcp.so.2.0.0
/usr/lib/X11/locale/common/xlibi18n.so.2.0.0
/usr/lib/libX11.so.6.2.0
/usr/lib/libXau.so.6.0.0
/usr/lib/libXcursor.so.1.0.2
/usr/lib/libXdmcp.so.6.0.0
/usr/lib/libXext.so.6.4.0
/usr/lib/libXfixes.so.3.1.0
/usr/lib/libXft.so.2.1.2
/usr/lib/libXinerama.so.1.0.0
/usr/lib/libXrandr.so.2.0.0
/usr/lib/libXrender.so.1.3.0
/usr/lib/libXt.so.6.0.0
/usr/lib/libz.so.1.2.3

That's quite a lot of libraries, at first sight. But it only comes to
35913Kb, and some of that won't be paged in at any given moment.

(I guess I could parse /proc/*/pmaps to find out how much *is*, but,
hm, not right now.)

The only libraries easily detachable from the rest are the ones in
/usr/lib/kde3, which are dlopen()ed plugins and KParts. Ignoring
libhtmlimagepart and libktmlpart, which we'll probably need, ditching
the rest from /usr/lib/kde3 saves us all of 4129Kb, almost entirely in
plugins from kdetoys or other parts of KDE which are *already* optional
addons. That's not really worth bothering with these days, except on
exceptionally small or memory-constrained machines (like OLPC).

(FWIW, the vile one-liner I used for that:

{ echo -n '('; pmap 2979 | awk '{ print $4;}' | sort -u | sed 's,/packages.bin/[^/][^/]*/[^/][^/]*,,g' | grep '\.so' | xargs ls -Ll | awk '{print $5;}' | sed 's,$,+,' | tr -d '\n'; echo '0)/1024';} | bc

> [1] Without knowing the architecture and code in any detail, this is
>     pure speculation on my part, but I'd be surprised if it wasn't so.

Sorry, it's not so.

-- 
`In typical emacs fashion, it is both absurdly ornate and
 still not really what one wanted.' --- jdev
-- 
Gllug mailing list  -  Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug




More information about the GLLUG mailing list