Hello list,

there was some discussion on #sofia-sip about the size of libsofia-sip-ua, 
and how to minimize it for embedded applications. The figures posted were 
quite high, so I decided to do some testing myself.

Testing method
--------------
- tests done with darcs versions of sofia-sip and sofsip-cli
- compile sofsip_cli A) normally link dynamically against all
   the libraries, B) with static linkage of libsofia-sip-ua, other
   libs still dynamically linked
- measure the binary size increament 1->2

Notes/assumptions
-----------------
- note: if you link statically againt sofia-sip as in these tests, your
   application has be LGPL/GPL licensed as well; otherwise you need to link
   dynamically
- it's a sensible assumption that you will anyways have the
   full POSIX runtime installed (and not just picking those parts
   of it needed by the SIP client from libc) -> not measuring the amount
   of code used from libc
- same with SSL, if you need it, you probably have to whole library
   installed -> not measuring the amount of code used from libssl
- our glib/gobject wrappers are not taken into consideration here
   (especially as their use is optional)
- test compiler gcc-4.0.1 with default settings ("-O2")

Results
-------

1) sofia-sip compiled without any extra options, debug symbols stripped:
    ./configure && make all install

- sofsip_cli size: A) 93336, B) 1020248 bytes
=> size increase: 905K

2) sofia-sip without any debugging messages, debug symbols stripped:
    ./configure && make CPPFLAGS="-DSU_DEBUG_MAX=0" all install

- sofsip_cli size: A) 93336, B) 918872 bytes
=> size increase: 806K

How to cut down the size even more
----------------------------------

Going even lower is possible, but requires some manual tuning. You need to 
check which stack features you an live without, and disable those by hand 
(patches that add ./configure flags for these are welcome). Possible 
candidate features are: TLS (in 'tport'), STUN (all of 'stun'), HTTP stack 
(all of 'http'), DNS resolving (all of 'sresolv'), SIMPLE features 
('nea' module), etc

-- 
  under work: Sofia-SIP at http://sofia-sip.sf.net


_______________________________________________
Sofia-sip-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel

Reply via email to