poi-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject [Bug 61722] New: Review ways to avoid new Integer()/Integer.valueOf() in performance sensitive places
Date Fri, 03 Nov 2017 22:21:08 GMT
https://bz.apache.org/bugzilla/show_bug.cgi?id=61722

            Bug ID: 61722
           Summary: Review ways to avoid new Integer()/Integer.valueOf()
                    in performance sensitive places
           Product: POI
           Version: 4.0-dev
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: XSSF
          Assignee: dev@poi.apache.org
          Reporter: dominik.stadler@gmx.at
  Target Milestone: ---

We did some changes in bug #57840 to use "new Integer()" instead of
"Integer.valueOf()", because the caching for reduced memory use in "valueOf()"
comes with a slight CPU penalty, see r1747837.

However later on, these were reverted again as some code cleanup tools flag
these as "sub-optimal" and suggest to change them to "valueOf()". 

Before re-applying this again, let's do some research if there are better ways
to do this as it seems we create lots of objects, mostly to look up values in
maps. 

Maybe we should use something like Trove Maps which allows to use primitives in
maps directly without the cost of converting to objects, see
https://bitbucket.org/trove4j/trove for details.

See the performance test added in r1747878 for a starting point of an
evaluation of the effect of changes.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


Mime
View raw message