Github user knusbaum commented on a diff in the pull request:
https://github.com/apache/storm/pull/694#discussion_r37780743
--- Diff: storm-core/src/clj/backtype/storm/daemon/executor.clj ---
@@ -445,6 +445,32 @@
ret
))
+(defn init-batching-buffer [worker-context component-id]
+ (let [batchSize (.get_batch_size (.getComponentCommon worker-context
component-id))]
+ (if (> batchSize 1)
+ (let [consumer-ids (flatten (for [cids (vals (.getTargets
worker-context component-id))] (keys cids)))
+ consumer-task-ids (flatten (for [cid consumer-ids :when (not
(.startsWith cid "__"))] (into '() (.getComponentTasks worker-context cid))))]
+ (HashMap. (zipmap consumer-task-ids (repeatedly (count
consumer-task-ids) #(Batch. batchSize)))))
+ (HashMap.)
+ )))
+
+(defn emit-msg [out-task out-tuple overflow-buffer output-batch-buffer
transfer-fn]
--- End diff --
Try type-hinting `output-batch-buffer` here. I haven't profiled it myself,
but what you're saying as far as performance goes sounds like it could be the
result of reflection. Type-hinting anything you're calling methods on should
help.
---
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.
---