-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Check Emitter performance for no-listener case #80
Comments
Another possibility: for client code that is a bottleneck and likely to have no observers, put the check in the client code. For instance, in this case, Kite could check if there are listeners before calling emit. |
I noted that in Graphing Quadratics, listeners with no emitters (in the
The averages are: Note the first several samples are not in steady state and occur while the browser is optimizing: The averages are This looks to be "in the noise" with a slight preference for the guard, however, the Wilcoxon signed rank test https://www.socscistatistics.com/tests/signedranks/Default2.aspx on the tails of the data says this is statistically significant. It seems a step in the right direction, so I'll commit. |
I should note, all of those tests were done on Macbook Pro running Chrome. Anyways, closing for now. |
It may be beneficial to wrap emit() bodies with a check to see if there are currently any listeners that would be notified.
Some bottlenecks in Kite are currently with Events that would be emitting with no listeners, so it would be beneficial if this is a fast operation.
Worth a performance check for "no listeners" and "some listeners" both before and after adding a guard, to make sure we don't compromise other performance.
The text was updated successfully, but these errors were encountered: