[jira] [Commented] (PROTON-1911) improve performance of String encoding

2018-08-21 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/PROTON-1911?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16587145#comment-16587145
 ] 

ASF GitHub Bot commented on PROTON-1911:


Github user ctron closed the pull request at:

https://github.com/apache/qpid-proton-j/pull/14


> improve performance of String encoding
> --
>
> 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.25.0, proton-j-0.28.0
>Reporter: Jens Reimann
>Priority: Major
>  Labels: pull-request-available
> Fix For: proton-j-0.29.0
>
> 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
>
>
> Testing has highlighted that the encoding of Strings within messages isn't 
> very efficient, due to the manner in which the output is written to the 
> destination buffer. By expanding WritableBuffer to allow writing a String 
> directly, and improving the String encoding implementation therein we can 
> improve performance of String encoding.  Leveraging PROTON-1913 we can also 
> provide the previous impl as a default fallback to avoid breaking 
> compatibility with existing WritableBuffer implementations that lack one.
> 
> Original description:
> 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: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org



[jira] [Commented] (PROTON-1911) improve performance of String encoding

2018-08-20 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/PROTON-1911?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16585735#comment-16585735
 ] 

ASF GitHub Bot commented on PROTON-1911:


Github user gemmellr commented on the issue:

https://github.com/apache/qpid-proton-j/pull/14
  
After some investigation and testing, a different approach 
(https://github.com/apache/qpid-proton-j/commit/7eac8b945c8ce90f091126d34cf174e8792fdfc0)
 for improvement was taken as discussed on 
https://issues.apache.org/jira/browse/PROTON-1911.

Could you close this PR? We can only do so via commit messages since this 
repo is a mirror with limited controls.

Thanks,
Robbie.


> improve performance of String encoding
> --
>
> 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.25.0, proton-j-0.28.0
>Reporter: Jens Reimann
>Priority: Major
>  Labels: pull-request-available
> Fix For: proton-j-0.29.0
>
> 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
>
>
> Testing has highlighted that the encoding of Strings within messages isn't 
> very efficient, due to the manner in which the output is written to the 
> destination buffer. By expanding WritableBuffer to allow writing a String 
> directly, and improving the String encoding implementation therein we can 
> improve performance of String encoding.  Leveraging PROTON-1913 we can also 
> provide the previous impl as a default fallback to avoid breaking 
> compatibility with existing WritableBuffer implementations that lack one.
> 
> Original description:
> 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: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org



[jira] [Commented] (PROTON-1911) improve performance of String encoding

2018-08-10 Thread ASF subversion and git services (JIRA)


[ 
https://issues.apache.org/jira/browse/PROTON-1911?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16576734#comment-16576734
 ] 

ASF subversion and git services commented on PROTON-1911:
-

Commit d269819e69ef6ab0cf6430670c3f76cf4ba5b017 in qpid-proton-j's branch 
refs/heads/master from [~gemmellr]
[ https://git-wip-us.apache.org/repos/asf?p=qpid-proton-j.git;h=d269819 ]

PROTON-1911: tweak to restore previous exception behaviour


> improve performance of String encoding
> --
>
> 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.25.0, proton-j-0.28.0
>Reporter: Jens Reimann
>Priority: Major
>  Labels: pull-request-available
> Fix For: proton-j-0.29.0
>
> 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
>
>
> Testing has highlighted that the encoding of Strings within messages isn't 
> very efficient, due to the manner in which the output is written to the 
> destination buffer. By expanding WritableBuffer to allow writing a String 
> directly, and improving the String encoding implementation therein we can 
> improve performance of String encoding.  Leveraging PROTON-1913 we can also 
> provide the previous impl as a default fallback to avoid breaking 
> compatibility with existing WritableBuffer implementations that lack one.
> 
> Original description:
> 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: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org