On Thu, 14 Apr 2011, Sven Barth wrote:

Am 14.04.2011 10:17, schrieb [email protected]:


On Thu, 14 Apr 2011, Mattias Gaertner wrote:

On Thu, 14 Apr 2011 09:47:57 +0200 (CEST)
[email protected] wrote:



On Thu, 14 Apr 2011, zeljko wrote:

On Thursday 14 of April 2011 09:33:03 Michael Van Canneyt wrote:
Hi,

due to some other topic discussed on the mailing list, I thought
I'd check
the dependencies of a simple lazarus project. The result is shown
below.

I did this similar exercise a year or two ago, and the result has
more than
tripled !

I wonder, why all these dependencies ??
I mean, libselinux, libcairo, libexpat, libdirectfb, libfusion,
libdirect
(to name but a few), why do I need those ?

You don't but gtk does (or cairo or some xlib).

Hm. I did a quick check:

fsb: >ldd /usr/lib/libgdk-x11-2.0.so.0 | wc -l
44
fsb: >ldd /usr/lib/libqt-mt.so.3.3.8 | wc -l
31
So Qt needs 31 libs, GTK uses 44. Many of the extra ones related to
direct framebuffer
access, which is total nonsense in a X environment.

The gnome projects likes to split libs in smaller modules.
The number of libs is not that important. The size is more important:

A gtk2 program:
ldd testgtk2 | cut -d' ' -f 3 | grep lib | xargs cat | wc -c
14932491

A qt program:
ldd testqt | cut -d' ' -f 3 | grep lib | xargs cat | wc -c
53583219

So Qt uses about 50MB, GTK uses 15MB.

I get quite a different count:

fsb: >ldd /usr/lib/libqt-mt.so.3.3.8 | cut -d' ' -f 3 | xargs cat | wc -c
7172681
fsb: >ldd /usr/lib/libgdk-x11-2.0.so.0 | cut -d' ' -f 3 | xargs cat | wc -c
9804745

7 vs. 9 Mb. Just for the Qt/Gtk library.


But libgdk does not contain all dependencies that a GTK application needs (can't comment on QT though).

Indeed. for GTK, the problem is bigger:

fsb: >ldd /usr/lib/libgtk-x11-2.0.so.0 | cut -d' ' -f 3 | xargs cat | wc -c
10646417

It needs 10Mb, more than the Qt lib.

And I checked: the LCL app loads exactly the same list of libraries as the GTK lib itself. I don't have an LCL Qt app to compare with.

Michael.

--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to