commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Paul Loy (Commented) (JIRA)" <>
Subject [jira] [Commented] (IO-286) FastByteArray*Stream implementations to replace syncronized JDK ByteArray*Stream
Date Thu, 10 Nov 2011 19:18:51 GMT


Paul Loy commented on IO-286:

The TByteArrayOutputStream without deep copy is irrelevant due to the cool things that commons-io
ByteArrayOutputStream does BTW. So all we're talking about here is removing synchronization
to provide a non-thread-safe but quicker implementation. In my experience, something like
99% of uses of ByteArrayOutputStream do not require thread safety.
> FastByteArray*Stream implementations to replace syncronized JDK ByteArray*Stream
> --------------------------------------------------------------------------------
>                 Key: IO-286
>                 URL:
>             Project: Commons IO
>          Issue Type: New Feature
>          Components: Streams/Writers
>            Reporter: Paul Loy
>            Priority: Minor
>              Labels: streams, synchronized
>   Original Estimate: 24h
>  Remaining Estimate: 24h
> In CASSANDRA-2820 I reintoduced the FastByteArrayInputStream and FastByteArrayOutputStream
to cassandra. These steams are un-synchronized versions of the Apache Harmony ByteArrayInputStream
and ByteArrayOutputStream respectively.
> During my own testing of the streams I found a big difference in the performance of the
standard JDK BA*S steams and the FBA*S streams on most JREs. Then cassandra load testing also
showed an up to 10% improvement in cassandra performance using these streams.
> Then Thrift has TByteArrayOutputStream which contains a way to get the underlying byte[]
buffer without a deep copy that would probably be a good further enhancement.
> Patch to follow.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:!default.jspa
For more information on JIRA, see:


View raw message