Re: [gtk-list] Gtk-- FAQ: 2nd version



> Hi Guys, 
> 
> first of all, apologies for the long turnaround time on this, 
> but for various resons I just never got around to getting the 
> first round of fixes/suggestions in ... I promise to be 
> faster in the future ...
> 
> Anyways, the current text version can be found at 
> http://www.peoplesoft.com/peoplepages/g/robert_gasch/terraform/Gtk--FAQ.txt
> 
> Within a week or so I will finalize the FAQ, SGMLize it and submit it 
> to Tero P. 
> 
> Also, if some of the Gtk-- gurus could take a look at question 
>         2.7) How fat of wrapper is Gtk--? 
> I have looked at the sizes for some common executables, but 
> don't really know why the (sample) Gtk-- executables are quite 
> a bit larger than the Gtk+ ones.

Well, comparing executable size is not a very acturate measure of
the size of the executable code.  C++ executables contains lots of extra 
info in the executable like exception info, type info, virtual
tables and the like.  (Name managling and STL add to the total
as well.) Gtk-- also has a pile more symbols that gtk+ programs
as both the gtk+ symbols and all the gtk-- type symbols are needed
to link to the shared library. 

If you want to give a more accurate account use the size as well
as resident size.  

         Gtk+ File   Gtk+ SIZE    Gtk+ RSS  Gtk-- File   Gtk-- SIZE  Gtk-- RSS
Buttons: 5776        3164         1804      26148        4512        2884
( redhat 5.2 stripped Gtk-- 1.1 with -O3)

ps -l
 FLAGS   UID   PID  PPID PRI  NI   SIZE   RSS WCHAN       STA TTY TIME COMMAND
100000   500  6704   477   0   0   3164  1804  12d7d9     S   p2  0:00 ./buttons
100000   500  6713   477   0   0   4512  2884  12d7d9     S   p2  0:00 ./buttons

SIZE = Virtual image size; size of text+data+stack
RSS  = Resident size

Thus the actual ammount of the 25.5k that was loaded was only 4.4k while
3.0k of the 5.6k gtk+ binary was loaded.  Comparing filesizes with 
C++ files tends to be very bad in general.  I doubt the 5x scaler
continues as the size of the program increases. But I could be 
wrong.

--Karl



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