Github user knusbaum commented on a diff in the pull request:

    https://github.com/apache/storm/pull/694#discussion_r37807094
  
    --- Diff: storm-core/src/clj/backtype/storm/daemon/executor.clj ---
    @@ -658,40 +688,42 @@
                               
                               ;;(log-debug "Received tuple " tuple " at task " 
task-id)
                               ;; need to do it this way to avoid reflection
    -                          (let [stream-id (.getSourceStreamId tuple)]
    -                            (condp = stream-id
    -                              Constants/CREDENTIALS_CHANGED_STREAM_ID 
    -                                (let [task-data (get task-datas task-id)
    -                                      bolt-obj (:object task-data)]
    -                                  (when (instance? ICredentialsListener 
bolt-obj)
    -                                    (.setCredentials bolt-obj (.getValue 
tuple 0))))
    -                              Constants/METRICS_TICK_STREAM_ID 
(metrics-tick executor-data (get task-datas task-id) tuple)
    -                              (let [task-data (get task-datas task-id)
    -                                    ^IBolt bolt-obj (:object task-data)
    -                                    user-context (:user-context task-data)
    -                                    sampler? (sampler)
    -                                    execute-sampler? (execute-sampler)
    -                                    now (if (or sampler? execute-sampler?) 
(System/currentTimeMillis))]
    -                                (when sampler?
    -                                  (.setProcessSampleStartTime tuple now))
    -                                (when execute-sampler?
    -                                  (.setExecuteSampleStartTime tuple now))
    -                                (.execute bolt-obj tuple)
    -                                (let [delta (tuple-execute-time-delta! 
tuple)]
    -                                  (when (= true (storm-conf 
TOPOLOGY-DEBUG))
    -                                    (log-message "Execute done TUPLE " 
tuple " TASK: " task-id " DELTA: " delta))
    - 
    -                                  (task/apply-hooks user-context 
.boltExecute (BoltExecuteInfo. tuple task-id delta))
    -                                  (when delta
    -                                    (builtin-metrics/bolt-execute-tuple! 
(:builtin-metrics task-data)
    -                                                                         
executor-stats
    -                                                                         
(.getSourceComponent tuple)                                                     
 
    -                                                                         
(.getSourceStreamId tuple)
    -                                                                         
delta)
    -                                    (stats/bolt-execute-tuple! 
executor-stats
    -                                                               
(.getSourceComponent tuple)
    -                                                               
(.getSourceStreamId tuple)
    -                                                               delta)))))))
    +                          (let [tuples (if (instance? TupleImpl 
tupleOrBatch) (list tupleOrBatch) (.buffer tupleOrBatch))]
    +                            (doseq [tuple tuples]
    +                              (let [stream-id (.getSourceStreamId tuple)]
    --- End diff --
    
    This line, for instance, is eating 9% of the CPU time.
    <img width="1296" alt="screen shot 2015-08-24 at 4 26 07 pm" 
src="https://cloud.githubusercontent.com/assets/1819836/9452988/143be13e-4a7d-11e5-812f-6c2eefd2b96e.png";>



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to