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

Ivan Suller commented on HIVE-21297:
------------------------------------

[~bslim] I didn't see any significant problem where we create new objects per 
row (maybe except in the ColumnBuffer class, but not sure how exactly that 
works). Most of the changes affects the compile time (and tests). I don't 
expect significant performance improvement - this is mostly a precautionary 
change to make sure it won't cause anything.

I am not sure if we can add a checkstyle rule in to prevent new issues like 
this popping up again.

> Replace all occurences of new Long, Boolean, Double etc with the 
> corresponding .valueOf
> ---------------------------------------------------------------------------------------
>
>                 Key: HIVE-21297
>                 URL: https://issues.apache.org/jira/browse/HIVE-21297
>             Project: Hive
>          Issue Type: Improvement
>            Reporter: Ivan Suller
>            Assignee: Ivan Suller
>            Priority: Trivial
>             Fix For: 4.0.0
>
>         Attachments: HIVE-21297.01.patch
>
>
> Creating new objects with new Long(...), new Boolean etc creates a new 
> object, while Long.valueOf(...), Boolean.valueOf(...) can be cached (and is 
> actually cached in most if not all JVMs) thus reducing GC overhead. I already 
> had two similar tickets (HIVE-21228, HIVE-21199) - this one finishes the job.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to