hadoop-common-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Doug Cutting (JIRA)" <j...@apache.org>
Subject [jira] Updated: (HADOOP-1017) Optimization: Reduce Overhead from ReflectionUtils.newInstance
Date Sat, 17 Feb 2007 00:31:05 GMT

     [ https://issues.apache.org/jira/browse/HADOOP-1017?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Doug Cutting updated HADOOP-1017:
---------------------------------

    Fix Version/s: 0.12.0
           Status: Patch Available  (was: Open)

+1 Looks good to me.

> Optimization: Reduce Overhead from ReflectionUtils.newInstance
> --------------------------------------------------------------
>
>                 Key: HADOOP-1017
>                 URL: https://issues.apache.org/jira/browse/HADOOP-1017
>             Project: Hadoop
>          Issue Type: Improvement
>          Components: util
>            Reporter: Ron Bodkin
>             Fix For: 0.12.0
>
>         Attachments: cacheCtor.patch, cacheCtor.patch, ReflectionUtils.patch.txt, TestReflectionUtils.java
>
>
> I found that a significant amount of time on my project was being spent in creating constructors
for each row of data. I dramatically optimized this performance by creating a simple WeakHashMap
to cache constructors by class. For example, in a sample job I find that ReflectionUtils.newInstance
takes 200 ms (2% of total) with the cache enabled, but it uses 900 ms (6% of total) without
the cache.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message