-
Bug
-
Resolution: Fixed
-
P3
-
8, 9
-
b23
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8063742 | 8u45 | Sean Mullan | P3 | Resolved | Fixed | b01 |
JDK-8050000 | 8u40 | Sean Mullan | P3 | Resolved | Fixed | b01 |
JDK-8070193 | emb-8u47 | Sean Mullan | P3 | Resolved | Fixed | team |
JDK-8175440 | openjdk7u | Sean Mullan | P3 | Resolved | Fixed | master |
Serious performance issue, bug was initially filed against Apache Santuario.
From https://issues.apache.org/jira/browse/SANTUARIO-393 :
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.
From https://issues.apache.org/jira/browse/SANTUARIO-393 :
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.
- backported by
-
JDK-8050000 XML Signature performance issue caused by unbuffered signature data
- Resolved
-
JDK-8063742 XML Signature performance issue caused by unbuffered signature data
- Resolved
-
JDK-8070193 XML Signature performance issue caused by unbuffered signature data
- Resolved
-
JDK-8175440 XML Signature performance issue caused by unbuffered signature data
- Resolved