reasonable to publish thousands of different events on an EventEmitter
? (benchmarks added)
#4030
Labels
EventEmitter
? (benchmarks added)
#4030
Details
Is it reasonable to use
EventEmitter
for publishing hundreds or thousands of different events to consumers, or is necessary to broadcast such events through another mechanism. Pre-existing performance benchmarks weren't found.Following the benchmark guide, and a comment from someone in the PR linked below, I've made the following benchmark script but am not certain how to interpret the results --it would seem using "only" tens of event emitters is a terrible idea. Would someone with benchmark or EventEmitter experience confirm this interpretation?
benchmark script, with results as follows below
Node.js version
node 16 latest
Example code
Operating system
alpine linux
Scope
runtime
Module and version
Not applicable.
The text was updated successfully, but these errors were encountered: