[
https://issues.apache.org/activemq/browse/AMQCPP-93?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_39519
]
Timothy Bish commented on AMQCPP-93:
------------------------------------
If the code in those classes isn't adhering to their explicit contract, than
its a bug, not a feature that we can exploit. We should create an issue, call
out the offending classes, and add test cases that demonstrate the issue so
that we can eventually add them into our unit tests to prove we are meeting our
contracts.
We cannot add a readString to InputStream as the Input and OuputStream
interfaces define a low level interface that is not to be aware of anything
other than primitive types, classes like SocketInputStream,
ByteArrayInputStream etc don't know and shouldn't know how to read those types
of objects, that's not their purpose. As we move up to higher levels of
abstraction like DataInputStream we add on the knowledge of such things as what
a UTF String verses a ASCII string look like in the stream, at even higher
levels you could create something to read ClassX and ClassY, but you wouldn't
want to add that back into the InputStream interface.
If we can increase the performance of readString in DataInputStream that's
great but we can't do it by violating the contract of the interfaces that are
implemented. We are striving for generic reusable code that can run across
many platforms and provide a flexible interface for its users, to that end you
sometimes have to sacrifice a little performance.
> Performance analysis
> --------------------
>
> Key: AMQCPP-93
> URL: https://issues.apache.org/activemq/browse/AMQCPP-93
> Project: ActiveMQ C++ Client
> Issue Type: Task
> Affects Versions: 2.0
> Reporter: Nathan Mittler
> Assignee: Nathan Mittler
> Fix For: 2.2
>
> Attachments: amqcpp-perf1.patch, amqcpp-perf1v2.patch, bench1.cpp,
> bench2.cpp, DataInputStream.patch, DataOutputStreamv0.patch, patch Results.xls
>
>
> Do a performance analysis on openwire vs stomp.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.