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

Lars Hofhansl commented on HBASE-9711:
--------------------------------------

The {{String(byte bytes[], int offset, int length, Charset charset)}} 
constructor copies the entire passed byte[] regardless of offset/length (in 
JDK6).
To avoid that we now make a copy of the portion identified by offset/length and 
pass that to String(...).
But if the length portion is >= 1/2 of the byte[] we'd actually do more work 
than before.


> Improve HBASE-9428 - avoid copying bytes for RegexFilter unless necessary
> -------------------------------------------------------------------------
>
>                 Key: HBASE-9711
>                 URL: https://issues.apache.org/jira/browse/HBASE-9711
>             Project: HBase
>          Issue Type: Sub-task
>            Reporter: Lars Hofhansl
>            Assignee: Lars Hofhansl
>            Priority: Trivial
>             Fix For: 0.98.0, 0.94.13, 0.96.1
>
>         Attachments: 9711-trunk.txt
>
>
> Parent patch copies input for RegexFilter unconditionally.
> We should only do this if the KV portion into the passed byte[] is < 1/2 of 
> the passed byte[]. Otherwise we waste cycles.
> Patch is trivial and will be coming momentarily.



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Reply via email to