[xmlsec] Re: About the performance of libxml

Aleksey Sanin aleksey at aleksey.com
Sat Sep 28 00:51:27 PDT 2002


Great! Thanks for update. I'll take a look and probably make this change in
the source code. I did *huge* performance tweaking between 0.0.7 and 0.0.9.
And you just confirmed it :)  I don't think that you'll get *much* 
better results on
optimized versions. May be 5-10% but I doubt you can get more.
There is no direct restriction on the data size for XMLSec. In general, 
you roughly
need twice memory to store DOM tree. Plus something for XMLSec. I would say
that max file size is equal to 1/4 of available memory (including swap). 
However,
this significantly dependce on the transforms in the signature.

Aleksey


Michael Mi wrote:

>Hi Aleksey,
>
>I have good news.
>
>I changed something in the source code, then I can build libxmlsec 0.0.9
>successfully. the modification is as following:
>
>in line 24 of xmlsec.h, from
>
>#define XMLSEC_EXPORT_VAR extern
>
>to
>
>#define XMLSEC_EXPORT_VAR __declspec(dllexport) extern
>
>I am not sure whether it is correct or not, at least, it can work now.
>
>Another thing is that, although the performance of libxmlsec 0.0.6 is not so
>good, I have to admit that 0.0.9 is really satisfying. When I try a file
>sized of 10M, it takes 55 seconds to finish signing. It is quite good. All
>the programs are debug version, if under release version, I think, it will
>much faster.
>
>Thanks a lot.
>
>By the way, how big file can be supported when signing by libxmlsec?
>
>Michael
>
>
>
>----- Original Message -----
>From: "Aleksey Sanin" <aleksey at aleksey.com>
>To: "Michael Mi" <hao.mi at sun.com>
>Cc: "Igor Zlatkovic" <igor at stud.fh-frankfurt.de>
>Sent: Saturday, September 28, 2002 11:37 AM
>Subject: Re: About the performance of libxml
>
>
>  
>
>>All these are constants. looks like XMLSEC_EXPORT_* are not set correctly.
>>Most likely due to config errors. I don't actually play with Windows
>>much so I am
>>not sure I can be helpful here. I've copied Igor Zlatkovic, may be he
>>can spot the problem.
>>
>>Aleksey
>>
>>Michael Mi wrote:
>>
>>    
>>
>>>Hi,
>>>
>>>I corrected something, by now, the error message is as following:
>>>
>>>
>>>       Creating library binaries\libxmlsec.lib and object
>>>    binaries\libxmlsec.exp
>>>            lib.exe /nologo /OUT:binaries\libxmlsec_a.lib
>>>    libxmlsec.int\aes.obj libx
>>>    mlsec.int\base64.obj libxmlsec.int\bn.obj
>>>    libxmlsec.int\buffered.obj  libxmlsec
>>>    .int\c14n.obj  libxmlsec.int\ciphers.obj  libxmlsec.int\debug.obj
>>>    libxmlsec.int
>>>    \des.obj  libxmlsec.int\digests.obj  libxmlsec.int\dsa.obj
>>>    libxmlsec.int\envelo
>>>    ped.obj  libxmlsec.int\errors.obj  libxmlsec.int\hmac.obj
>>>    libxmlsec.int\io.obj
>>>     libxmlsec.int\keyinfo.obj  libxmlsec.int\keys.obj
>>>    libxmlsec.int\keysmngr.obj
>>>    libxmlsec.int\membuf.obj  libxmlsec.int\nodeset.obj
>>>    libxmlsec.int\ripemd160.obj
>>>      libxmlsec.int\rsa.obj  libxmlsec.int\sha1.obj
>>>    libxmlsec.int\transforms.obj  l
>>>    ibxmlsec.int\x509.obj  libxmlsec.int\xmldsig.obj
>>>    libxmlsec.int\xmlenc.obj  libx
>>>    mlsec.int\xmlsec.obj  libxmlsec.int\xmltree.obj
>>>    libxmlsec.int\xpath.obj  libxml
>>>    sec.int\xslt.obj
>>>            if not exist apps.int mkdir apps.int
>>>            cl.exe /nologo /D "WIN32" /D "_WINDOWS" /D "_MBCS" /W1 /MD
>>>    /I.. /I..\inc
>>>    lude /I..\src /D "_DEBUG" /Od /Z7 /Foapps.int\ /c ..\apps\xmlsec.c
>>>    xmlsec.c
>>>            link.exe /nologo /LIBPATH:binaries /DEBUG
>>>    /OUT:binaries\xmlsec.exe libxm
>>>    lsec.lib libxslt.lib libeay32.lib libxml2.lib user32.lib gdi32.lib
>>>    apps.int\xmls
>>>    ec.obj
>>>    xmlsec.obj : error LNK2001: unresolved external symbol
>>>    __imp__xmlSecPrintErrorMe
>>>    ssages
>>>    xmlsec.obj : error LNK2001: unresolved external symbol
>>>    __imp__xmlSecHmacKey
>>>    xmlsec.obj : error LNK2001: unresolved external symbol
>>>    __imp__xmlSecDSigNs
>>>    xmlsec.obj : error LNK2001: unresolved external symbol
>>>    __imp__xmlSecEncNs
>>>    xmlsec.obj : error LNK2001: unresolved external symbol
>>>    __imp__xmlSecRsaKey
>>>    xmlsec.obj : error LNK2001: unresolved external symbol
>>>    __imp__xmlSecDsaKey
>>>    xmlsec.obj : error LNK2001: unresolved external symbol
>>>    __imp__xmlSecDesKey
>>>    xmlsec.obj : error LNK2001: unresolved external symbol
>>>    __imp__xmlSecAesKey
>>>    binaries\xmlsec.exe : fatal error LNK1120: 8 unresolved externals
>>>    NMAKE : fatal error U1077: 'link.exe' : return code '0x460'
>>>    Stop.
>>>
>>>
>>>It seems that all of the unresolved external symbol is from LibXmlSec,
>>>I still use the "static=no" configuration.
>>>
>>>I am not sure where I can change in the Makefile for making it through.
>>>
>>>Michael
>>>
>>>    ----- Original Message -----
>>>    From: Aleksey Sanin <mailto:aleksey at aleksey.com>
>>>    To: Michael Mi <mailto:hao.mi at sun.com>
>>>    Cc: SO-China-eng-xml at sun.com <mailto:SO-China-eng-xml at sun.com>
>>>    Sent: Saturday, September 28, 2002 11:03 AM
>>>    Subject: Re: About the performance of libxml
>>>
>>>    Looks like you have problems with LibXML2. Try to check that
>>>    everything
>>>    is compiled using the same flags.
>>>
>>>    Aleksey
>>>
>>>    Michael Mi wrote:
>>>
>>>      
>>>
>>>>    Hi Aleksey,
>>>>
>>>>    I am trying to build 0.0.9. But I meet some problem.
>>>>
>>>>    When I use following configuration:
>>>>
>>>>
>>>>        cscript configure.js prefix=... include=... lib=... debug=yes
>>>>
>>>>
>>>>    I got following error:
>>>>
>>>>
>>>>        libxml2_a.lib(encoding.obj) : error LNK2001: unresolved
>>>>        external symbol _libicon
>>>>        v_close
>>>>        libxml2_a.lib(encoding.obj) : error LNK2001: unresolved
>>>>        external symbol _libicon
>>>>        v_open
>>>>        libxml2_a.lib(encoding.obj) : error LNK2001: unresolved
>>>>        external symbol _libicon
>>>>        v
>>>>        binaries\libxmlsec.dll : fatal error LNK1120: 3 unresolved
>>>>        externals
>>>>        NMAKE : fatal error U1077: 'link.exe' : return code '0x460'
>>>>        Stop.
>>>>
>>>>
>>>>    While when I change to following configuration:
>>>>
>>>>
>>>>        cscript configure.js prefix=... include=... lib=... debug=yes
>>>>        static=no
>>>>
>>>>
>>>>    I got following error:
>>>>
>>>>
>>>>        xslt.obj : error LNK2001: unresolved external symbol _xmlMalloc
>>>>        x509.obj : error LNK2001: unresolved external symbol _xmlMalloc
>>>>        xmldsig.obj : error LNK2001: unresolved external symbol
>>>>        _xmlMalloc
>>>>        xmlenc.obj : error LNK2001: unresolved external symbol
>>>>        
>>>>
>_xmlMalloc
>  
>
>>>>        xpath.obj : error LNK2001: unresolved external symbol
>>>>        
>>>>
>_xmlMalloc
>  
>
>>>>        ripemd160.obj : error LNK2001: unresolved external symbol
>>>>        _xmlMalloc
>>>>        rsa.obj : error LNK2001: unresolved external symbol _xmlMalloc
>>>>        sha1.obj : error LNK2001: unresolved external symbol _xmlMalloc
>>>>        transforms.obj : error LNK2001: unresolved external symbol
>>>>        _xmlMalloc
>>>>        io.obj : error LNK2001: unresolved external symbol _xmlMalloc
>>>>        keysmngr.obj : error LNK2001: unresolved external symbol
>>>>        _xmlMalloc
>>>>        membuf.obj : error LNK2001: unresolved external symbol
>>>>        
>>>>
>_xmlMalloc
>  
>
>>>>        nodeset.obj : error LNK2001: unresolved external symbol
>>>>        _xmlMalloc
>>>>        des.obj : error LNK2001: unresolved external symbol _xmlMalloc
>>>>        dsa.obj : error LNK2001: unresolved external symbol _xmlMalloc
>>>>        enveloped.obj : error LNK2001: unresolved external symbol
>>>>        _xmlMalloc
>>>>        hmac.obj : error LNK2001: unresolved external symbol _xmlMalloc
>>>>        aes.obj : error LNK2001: unresolved external symbol _xmlMalloc
>>>>        base64.obj : error LNK2001: unresolved external symbol
>>>>        
>>>>
>_xmlMalloc
>  
>
>>>>        bn.obj : error LNK2001: unresolved external symbol _xmlMalloc
>>>>        c14n.obj : error LNK2001: unresolved external symbol _xmlMalloc
>>>>        xslt.obj : error LNK2001: unresolved external symbol _xmlFree
>>>>        xmldsig.obj : error LNK2001: unresolved external symbol
>>>>        
>>>>
>_xmlFree
>  
>
>>>>        xmlenc.obj : error LNK2001: unresolved external symbol _xmlFree
>>>>        xmltree.obj : error LNK2001: unresolved external symbol
>>>>        
>>>>
>_xmlFree
>  
>
>>>>        xpath.obj : error LNK2001: unresolved external symbol _xmlFree
>>>>        rsa.obj : error LNK2001: unresolved external symbol _xmlFree
>>>>        sha1.obj : error LNK2001: unresolved external symbol _xmlFree
>>>>        transforms.obj : error LNK2001: unresolved external symbol
>>>>        _xmlFree
>>>>        x509.obj : error LNK2001: unresolved external symbol _xmlFree
>>>>        keysmngr.obj : error LNK2001: unresolved external symbol
>>>>        
>>>>
>_xmlFree
>  
>
>>>>        membuf.obj : error LNK2001: unresolved external symbol _xmlFree
>>>>        nodeset.obj : error LNK2001: unresolved external symbol
>>>>        
>>>>
>_xmlFree
>  
>
>>>>        ripemd160.obj : error LNK2001: unresolved external symbol
>>>>        _xmlFree
>>>>        hmac.obj : error LNK2001: unresolved external symbol _xmlFree
>>>>        io.obj : error LNK2001: unresolved external symbol _xmlFree
>>>>        keyinfo.obj : error LNK2001: unresolved external symbol
>>>>        
>>>>
>_xmlFree
>  
>
>>>>        keys.obj : error LNK2001: unresolved external symbol _xmlFree
>>>>        des.obj : error LNK2001: unresolved external symbol _xmlFree
>>>>        digests.obj : error LNK2001: unresolved external symbol
>>>>        
>>>>
>_xmlFree
>  
>
>>>>        dsa.obj : error LNK2001: unresolved external symbol _xmlFree
>>>>        enveloped.obj : error LNK2001: unresolved external symbol
>>>>        _xmlFree
>>>>        aes.obj : error LNK2001: unresolved external symbol _xmlFree
>>>>        base64.obj : error LNK2001: unresolved external symbol _xmlFree
>>>>        bn.obj : error LNK2001: unresolved external symbol _xmlFree
>>>>        c14n.obj : error LNK2001: unresolved external symbol _xmlFree
>>>>        errors.obj : error LNK2001: unresolved external symbol
>>>>        _xmlGenericError
>>>>        errors.obj : error LNK2001: unresolved external symbol
>>>>        _xmlGenericErrorContext
>>>>        keysmngr.obj : error LNK2001: unresolved external symbol
>>>>        _xmlRealloc
>>>>        binaries\libxmlsec.dll : fatal error LNK1120: 5 unresolved
>>>>        externals
>>>>        NMAKE : fatal error U1077: 'link.exe' : return code '0x460'
>>>>        Stop.
>>>>
>>>>    The supporting package version I am using are iconv-1.8,
>>>>    libxml2-2.4.24, openssl-0.9.7-beta3, libxslt-1.0.20
>>>>
>>>>    What 's wrong?
>>>>
>>>>    Thanks
>>>>
>>>>    Michael
>>>>
>>>>
>>>>        ----- Original Message -----
>>>>        From: Aleksey Sanin <mailto:aleksey at aleksey.com>
>>>>        To: Michael Mi <mailto:hao.mi at sun.com>
>>>>        Cc: SO-China-eng-xml at sun.com <mailto:SO-China-eng-xml at sun.com>
>>>>        Sent: Saturday, September 28, 2002 9:53 AM
>>>>        Subject: Re: About the performance of libxml
>>>>
>>>>        Most likely! Please try 0.0.9. It's muuuuuuch faster.
>>>>
>>>>        Aleksey
>>>>
>>>>        Michael Mi wrote:
>>>>
>>>>        
>>>>
>>>>>Hi Aleksey,
>>>>>
>>>>>I am using 0.0.6. Is this the key of problem?
>>>>>
>>>>>Michael
>>>>>
>>>>>----- Original Message -----
>>>>>From: "Aleksey Sanin" <aleksey at aleksey.com>
>>>>>To: "Michael Mi" <hao.mi at sun.com>
>>>>>Cc: <SO-China-eng-xml at sun.com>
>>>>>Sent: Friday, September 27, 2002 11:24 PM
>>>>>Subject: Re: About the performance of libxml
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>          
>>>>>
>>>>>>I got one more idea for you: which XMLSec version do you use? I made
>>>>>>            
>>>>>>
>huge
>  
>
>>>>>>performance tuning in 0.0.9 and if you use previous versions then you
>>>>>>            
>>>>>>
>may
>  
>
>>>>>>have such terrible results.
>>>>>>
>>>>>>Aleksey
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>            
>>>>>>
>>>>>
>>>>>          
>>>>>
>>
>>    
>>
>
>  
>





More information about the xmlsec mailing list