You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@santuario.apache.org by "Colm O hEigeartaigh (JIRA)" <ji...@apache.org> on 2014/06/13 11:59:02 UTC

[jira] [Resolved] (SANTUARIO-393) Performance regression as signature data is not buffered

     [ https://issues.apache.org/jira/browse/SANTUARIO-393?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Colm O hEigeartaigh resolved SANTUARIO-393.
-------------------------------------------

       Resolution: Fixed
    Fix Version/s: Java 2.0.1

> Performance regression as signature data is not buffered
> --------------------------------------------------------
>
>                 Key: SANTUARIO-393
>                 URL: https://issues.apache.org/jira/browse/SANTUARIO-393
>             Project: Santuario
>          Issue Type: Bug
>          Components: Java
>    Affects Versions: Java 1.5.5
>            Reporter: Markus KilÄs
>            Assignee: Colm O hEigeartaigh
>              Labels: patch
>             Fix For: Java 1.5.7, Java 2.0.1
>
>         Attachments: xml-security-buffered-signing-markuskilas-1.patch
>
>
> Note: Only tested on 1.5.5 so affects version might be earlier.
> After upgrading from xmlsec (java) 1.4 to 1.5 we saw a significant drop
> in signature generation performance especially when using a network
> based HSM.
> After some investigation it turns out that the problem is that the
> hashing is done with one byte at a time which with network latencies
> gives the bad performance.
> Looking in the code of DOMSignedInfo.java it looks like the code intends
> to use an UnsyncBufferedOutputStream however only its close method is
> actually called, which as far as I can see won't have any side affect at
> all when operated on a ByteArrayOutputStream.
> The attached patch resolves the performance issue by actually using the
> UnsyncBufferedOutputStream and that way perform the digests on a
> possibly full buffer instead of byte by byte. The patch has been tested
> on version 1.5.5 but also applies on 1.5.6.



--
This message was sent by Atlassian JIRA
(v6.2#6252)