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

ASF GitHub Bot commented on STORM-1731:
---------------------------------------

Github user satishd commented on the pull request:

    https://github.com/apache/storm/pull/1362#issuecomment-215020195
  
    +1. Nice to remove unnecessary lookups in critical paths.
    
    
[worker.clj#L768](https://github.com/apache/storm/blob/1.x-branch/storm-core/src/clj/org/apache/storm/daemon/worker.clj#L768)
    HashMap instance is received in 
[config.clj#L76](https://github.com/apache/storm/blob/1.x-branch/storm-core/src/clj/org/apache/storm/config.clj#L76)
 from `Utils/readStormConfig` and converts that into clojure's 
`PersistentHashMap` while `clojurify-structure` is done. This map is merged 
later with other configs. This is all done when a worker is initialized. 
Clojure's `PersistentHashMap` is based on _Hash Array Mapped Trie_ which can 
have performance issues in critical paths for adding elements but lookups may 
not cost much more than java's `HashMap` which uses an array with RB tree.
    
     


> Avoid looking up debug / backpressure enable flags within critical path
> -----------------------------------------------------------------------
>
>                 Key: STORM-1731
>                 URL: https://issues.apache.org/jira/browse/STORM-1731
>             Project: Apache Storm
>          Issue Type: Bug
>          Components: storm-core
>    Affects Versions: 1.0.0
>            Reporter: Jungtaek Lim
>            Assignee: Jungtaek Lim
>            Priority: Critical
>
> While profiling the result of STORM-1729, I also found that there're many 
> places in critical path which look up the value of flags which are not 
> updated dynamically.
> ("get from map" is on top 5 from each spout / bolt thread.)
> This should be fixed.



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

Reply via email to