[
https://issues.apache.org/jira/browse/DERBY-5068?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13026241#comment-13026241
]
Knut Anders Hatlen commented on DERBY-5068:
-------------------------------------------
One transaction in the single-record select client results in the following
calls to Utf8CcsidManager methods:
- 8 calls to getByteLength()
- 3 calls to convertFromJavaString(String,byte[],int,Agent)
Both of these methods create an intermediate object (getByteLength() a byte
array, convertFromJavaString() a String) that's thrown away, whereas
EbcdicCcsid doesn't do that. Perhaps it's worthwhile to hand-code the UTF-8
encoding in these two methods to avoid having to create the intermediate
objects. Or if we don't want to maintain code that does UTF-8 encoding
ourselves: assume that all characters are ASCII and only fall back to using
intermediate objects if a non-ASCII character is found.
I'll run a quick experiment on the machines where I see this issue.
> Investigate increased CPU usage on client after introduction of UTF-8
> CcsidManager
> ----------------------------------------------------------------------------------
>
> Key: DERBY-5068
> URL: https://issues.apache.org/jira/browse/DERBY-5068
> Project: Derby
> Issue Type: Task
> Affects Versions: 10.7.1.1
> Reporter: Knut Anders Hatlen
>
> While looking at the performance graphs for the single-record select test
> during the last year -
> http://home.online.no/~olmsan/derby/perf/select_1y.html - I noticed that
> there was a significant increase (10-20%) in CPU usage per transaction on the
> client early in October 2010. To be precise, the increase seems to have
> happened between revision 1004381 and revision 1004794. In that period, there
> were three commits: two related to DERBY-4757, and one related to DERBY-4825
> (tests only).
> We should try to find out what's causing the increased CPU usage and see if
> there's some way to reduce it.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira