You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@santuario.apache.org by Martin Labarthe Dubois <du...@consist.com.ar> on 2004/04/19 20:08:24 UTC

1.1 Release - much Faster ???

Hi All,

is it possible that this version signs seven times faster that the 1.04 ???
because, I just replaced the old jars an obtained those times.

MLD




Re: 1.1 Release - much Faster ??? & Memory Issue

Posted by Martin Labarthe Dubois <du...@consist.com.ar>.
> If you don't use xpath transformations everything is a lot faster(If you
> use it, you get a moderate speed-up). But the best thing is that know
> that the engineSign is significative, the Scott's native JCE
> implementation improves the think a lot(x4 times) (Thanks Scott).
>  Right now in my test the slower part of the library is the c14n part,

well, as you can see, i am not using any transformation at all, that
explains the speed-up.:

      // transforms.addTransform(Transforms.TRANSFORM_ENVELOPED_SIGNATURE);
      // transforms.addTransform(Transforms.TRANSFORM_C14N_WITH_COMMENTS);
      // sig.addDocument(pPathPrefijo, transforms);
      sig.addDocument(pPathPrefijo);




Re: Memory & Performance

Posted by Sean Mullan <Se...@Sun.COM>.
Martin Labarthe Dubois wrote:
> I had memory problems signing big XMLs, so I decided to make my own specific
> XML signature algorithm that works with an specific "home made JAXB", i
> finished it today and i discoverd two things,
> 
> one is that it signs faster than 1.04, but identical to 1.1, but of course
> much more less flexible,
> 
> about memory ...
> 
> the version 1.1 still uses a lot of memory, but I don´t know in which step,
> it´s not the C14n transformation, because I don´t apply any transformation
> at all,

Yes, but unless the result of dereferencing your reference URI is a byte stream,
there will be an implicit C14n transformation to convert the nodeset to bytes
before the digesting is done. See section 4.3.3.5 of the W3C rec:
http://www.w3.org/TR/xmldsig-core/#sec-DigestMethod

--Sean


Memory & Performance

Posted by Martin Labarthe Dubois <du...@consist.com.ar>.
I had memory problems signing big XMLs, so I decided to make my own specific
XML signature algorithm that works with an specific "home made JAXB", i
finished it today and i discoverd two things,

one is that it signs faster than 1.04, but identical to 1.1, but of course
much more less flexible,

about memory ...

the version 1.1 still uses a lot of memory, but I don´t know in which step,
it´s not the C14n transformation, because I don´t apply any transformation
at all,

with my algorithm I use the JCE directly and it doen´t need much memory, but
the "home made Jaxb" uses JDOM to instanciate itself...., so all the memory
that I gain using JCE directly is being lost while loading the "JAXB"
structure.
The solution would be to replace the instantiation process of the jaxb from
JDOM to DOM or maybe better using a SAX parser, but it would make the
generated code dirtier.


Is there any way to improve memory usage in 1.1 ???







Re: 1.1 Release - much Faster ???

Posted by "raul-info@r-bg.com" <ra...@r-bg.com>.
Scott Cantor wrote:

>>is it possible that this version signs seven times faster 
>>that the 1.04 ???
>>because, I just replaced the old jars an obtained those times.
>>    
>>
>
>My test was about 3 times faster, but depending on the test case, I wouldn't
>be surprised. 1.1 is a huge improvement thanks to those last minute patches.
>
>-- Scott
>
>  
>
If you don't use xpath transformations everything is a lot faster(If you 
use it, you get a moderate speed-up). But the best thing is that know 
that the engineSign is significative, the Scott's native JCE  
implementation improves the think a lot(x4 times) (Thanks Scott).
 Right now in my test the slower part of the library is the c14n part, 
but is much harder to profile(the profiler doesn't like recursive a 
lot). I have near rewritten the c14n implementation for not been 
recursive but i don't see any improvement(and same case is much worse). 
If someone want help me I can post the implementation for discussion.

Regards,

RE: 1.1 Release - much Faster ???

Posted by Scott Cantor <ca...@osu.edu>.
> is it possible that this version signs seven times faster 
> that the 1.04 ???
> because, I just replaced the old jars an obtained those times.

My test was about 3 times faster, but depending on the test case, I wouldn't
be surprised. 1.1 is a huge improvement thanks to those last minute patches.

-- Scott