[
https://issues.apache.org/jira/browse/STORM-1729?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15257928#comment-15257928
]
ASF GitHub Bot commented on STORM-1729:
---------------------------------------
Github user unsleepy22 commented on the pull request:
https://github.com/apache/storm/pull/1361#issuecomment-214711443
+1
BTW. can we have more performance tests in more cases so that we can see
the overall performance change?
> Get rid of reflections while recording stats
> --------------------------------------------
>
> Key: STORM-1729
> URL: https://issues.apache.org/jira/browse/STORM-1729
> Project: Apache Storm
> Issue Type: Bug
> Components: storm-core
> Affects Versions: 1.0.0
> Reporter: Jungtaek Lim
> Assignee: Jungtaek Lim
> Priority: Critical
>
> I don't set affects version to 2.0.0 since it only occurs on Clojure.
> {code}
> (set! *warn-on-reflection* true)
> (load-file "src/clj/org/apache/storm/stats.clj")
> {code}
> {quote}
> Reflection warning,
> /Users/jlim/WorkArea/JavaProjects/storm/storm-core/src/clj/org/apache/storm/stats.clj:119:3
> - call to method incBy can't be resolved (target class is unknown).
> Reflection warning,
> /Users/jlim/WorkArea/JavaProjects/storm/storm-core/src/clj/org/apache/storm/stats.clj:123:3
> - call to method incBy can't be resolved (target class is unknown).
> Reflection warning,
> /Users/jlim/WorkArea/JavaProjects/storm/storm-core/src/clj/org/apache/storm/stats.clj:149:3
> - call to method incBy can't be resolved (target class is unknown).
> Reflection warning,
> /Users/jlim/WorkArea/JavaProjects/storm/storm-core/src/clj/org/apache/storm/stats.clj:150:3
> - call to method record can't be resolved (target class is unknown).
> Reflection warning,
> /Users/jlim/WorkArea/JavaProjects/storm/storm-core/src/clj/org/apache/storm/stats.clj:154:3
> - call to method incBy can't be resolved (target class is unknown).
> {quote}
> https://github.com/apache/storm/blob/1.x-branch/storm-core/src/clj/org/apache/storm/stats.clj#L119
> We expect there's no reflection since we give a type hint while calling, but
> it doesn't work.
> (I don't know why it doesn't work. Does generic type matter?)
> Anyway, defining them into let makes them avoid reflection.
> Even though we sample while recording stats, it does hurt performance with
> fast & high-traffic components.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)