Re: [xml] Regarding the size of xml parser



On Mon, Aug 30, 2004 at 07:48:42PM +0530, Rajesh M.C. wrote:

HI
I am working with the libxml2-2.6.9.Our parser is to be deployed embedded system.The footprint required is 
very less.Currently when i installed the libxml2,the
size of the static library is found to be 4.47MBytes.The sample application i built is having a size of 
1.9MBytes.
I tried with the ./configure --without--[packages]  for installing the library, still the size remains the 
same.
I tried to build the library separately,then also the same size was reached because of dependencies.
I read in the archive that the size can come to 750kbytes.But in my case the libxml2.la file is 
750kbytes.but the library size remained the same.
I am not using the ftp and http functionalities.
Please provide me the right approach for building the library and how to remove the dependencies.

  1/ use configure --with-minimum
  2/ a lot of the size comes from the symbols for the linker

paphio:~/XML -> ./configure --with-minimum --disable-shared ; make
....
paphio:~/XML -> ls -l .libs/libxml2.a
-rw-rw-r--    1 veillard www        856570 Sep  1 14:31 .libs/libxml2.a
paphio:~/XML -> size -t .libs/libxml2.a | sort -n | tail -4
  12608       0       0   12608    3140 uri.o (ex .libs/libxml2.a)
  19365      12       0   19377    4bb1 tree.o (ex .libs/libxml2.a)
  66849      16       0   66865   10531 parser.o (ex .libs/libxml2.a)
 161676    2752   32240  196668   3003c (TOTALS)
paphio:~/XML -> ls -l xmllint
-rwxrwxr-x    1 veillard www        507340 Sep  1 14:31 xmllint*
paphio:~/XML -> strip xmllint
paphio:~/XML -> ls -l xmllint
-rwxrwxr-x    1 veillard www        181896 Sep  1 14:33 xmllint*
paphio:~/XML -> ldd xmllint
        libm.so.6 => /lib/tls/libm.so.6 (0xb75b8000)
        libc.so.6 => /lib/tls/libc.so.6 (0xb7480000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0xb75eb000)
paphio:~/XML -> size xmllint
   text    data     bss     dec     hex filename
 173340    3300   82644  259284   3f4d4 xmllint
paphio:~/XML ->

  Subscribe to the list if you want further informations.

Daniel

-- 
Daniel Veillard      | Red Hat Desktop team http://redhat.com/
veillard redhat com  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/



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