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

Anoop Sam John commented on HBASE-14202:
----------------------------------------

Thanks Stack.  Will commit later tonight once QA passes.
bq.The Object/int pair is ugly 
Agree.. Bit odd it is.. But it helps us a lot wrt garbage we create.  :-)
This kind of more fine tuning sub tasks will come in under this Jira. We are 
doing more profiling stuff wrt CPU time and object/memory usage.

> Reduce garbage we create
> ------------------------
>
>                 Key: HBASE-14202
>                 URL: https://issues.apache.org/jira/browse/HBASE-14202
>             Project: HBase
>          Issue Type: Sub-task
>          Components: regionserver, Scanners
>    Affects Versions: 2.0.0
>            Reporter: Anoop Sam John
>            Assignee: Anoop Sam John
>             Fix For: 2.0.0
>
>         Attachments: HBASE-14202.patch
>
>
> 2 optimizations wrt no# short living objects we create
> 1. IOEngine#read call to read from L2 cache is always creating a Pair object 
> to return the BB and MemoryType. We can avoid this by making the read API to 
> return a Cacheable. Pass the CacheableDeserializer, to be used, also to the 
> read API. Setter for MemoryType is already there in Cacheable interface.
> 2. ByteBuff#asSubByteBuffer(int, int, Pair)  avoids Pair object creation 
> every time as we pass the shared Pair object. Still as pair can take only 
> Objects, the primitive int has to be boxed into an Integer object every time. 
> This can be avoided by creating a new Pair type which is a pair of an Object 
> and a primitive int.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to