This repository has been archived by the owner. It is now read-only.

Add protected EventEmitter::HaveListener() function. #992

wants to merge 1 commit into
Commits on Apr 29, 2011
  1. if EventEmitter exposed a protected HaveListeners method then objects…

    lloyd committed Apr 29, 2011
    … that emit events with payloads which are particularly costly to construct could optimize by using it. This is a naive implementation that affords a 15% performance improvement in one sample use case. This patch would be more interesting if the HaveListeners check itself could be made less expensive