[
https://issues.apache.org/jira/browse/PROTON-1911?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16571887#comment-16571887
]
Robbie Gemmell commented on PROTON-1911:
----------------------------------------
Independent of any improvements that can be made there, I'd first note that if
you used a Data section (which you should probably be doing if setting the
content type, since it "SHOULD NOT be set" with other sections), or sent a
Binary, the encoder wouldn't have to waste time UTF-8 encoding a String at all.
The mention of proton-j 0.22.0 in addition to 0.28.0 suggests you are using an
older version, there are a lot of perf improvements in newer proton-j you
should look into if still on 0.22.0, and knowing that you are using
vertx-proton I'd note there are perf improvements in newer version of that
also, though some wont arrive until 3.6.0 goes out.
> Performance issue in EncoderImpl#writeRaw(String)
> -------------------------------------------------
>
> Key: PROTON-1911
> URL: https://issues.apache.org/jira/browse/PROTON-1911
> Project: Qpid Proton
> Issue Type: Improvement
> Components: proton-j
> Affects Versions: proton-j-0.22.0, proton-j-0.28.0
> Reporter: Jens Reimann
> Priority: Major
> Labels: pull-request-available
> Attachments: qpid_encode_1.png, qpid_encode_2.png, qpid_encode_3.png,
> qpid_encode_4.png, strings_encode_after.json, strings_encode_before.json
>
>
> While digging into performance issues in the Eclipse Hono project I noticed a
> high consumption of CPU time when encoding AMQP messages using proton-j.
> I made a small reproducer and threw the same profiler at it, here are the
> results:
> As you can see in the attach screenshot (the first is the initial run with
> the current code) most of the time is consumed in
> EncoderImpl#writeRaw(String). This due to the fact that is call "put" for
> every byte it want to encode.
> The following screenshots are from a patched version which uses a small
> thread local buffer to locally encode the raw data and then flush it to the
> buffer in bigger chunks.
> Screenshot 3 and 4 show the improve performance, but also show that the
> memory consumption stays low.
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]