Re: [Glade-devel] Re: libglade vs glade for dialog generation



Hongli Lai wrote:

Let me briefly sum up, again. Using libglade + XML file instead of
Glade generated code means, you
- have more external library dependancies,
 >- have higher disk space consumption
 >- have greater installation package if it's to be self-contained

Statically link to libglade. libglade isn't that big.

It's not only libglade itself. There are three more libs equired if
libglade is to be used, as I mentioned earlier. And static linking
doesn't really reduce package size or required disk space, especially
not if libglade is already installed on a system. Btw, if I follow LGPL
(I think that's libglade's license, isn't it?) precisely, then static
linking isn't covered by the license, as others have concluded already.

And one can write a script/program to convert the bytes in the XML
file to a C array, similar to gdk-pixbuf-csource. Then you tell
libglade to parse the XML file from a variable instead of from a file.

This would neither reduce the overall size of the package nor the
performance penalty. If I have a Glade XML file which is so large (> 1
MB), that opening dialogs is seriously delayed (1 - 2 seconds or even
more), then this is not due to harddisk I/O but due to XML parsing.
Linking the file statically into the application would increase access
speed by some milliseconds only, but increase file size by exactly the
size of the XML file (which is those >1 MB in my case). With Glade code
my entire program (including interface.c and all other custom modules)
is less than 1 MB in size, hasn't any further dependencies (which I find
very convenient) and runs without delays, as with libglade + XML.

 > - have higher RAM conumption at application execution time

I really doubt that matters compared to the rest of the app or the 
desktop.

I believe such attitudes are to blame for ever-growing resource demands
of desktop environments and applications, with sometimes hardly
noticable benefits for the users. I don't follow it and I wish more
programmers wouldn't do either.



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]