When there are more than 10 event listeners, NodeJS alerts a warning:
(node:56301) MaxListenersExceededWarning: Possible EventTarget memory leak detected. 11 abort listeners added to [AbortSignal]. Use events.setMaxListeners() to increase limit at AbortSignal.[kNewListener] (node:internal/event_target:426:17)
For the application I am working with, it is fine to have more than 10 event listeners at a given point in time, so I will like to increase the threshold at which this event is triggered. But I need a methodical way to determine what to increase it to. Hence I was thinking, is it possible to estimate the memory used per each event listener? If possible, this can help estimate what the new limit should be.