openmct icon indicating copy to clipboard operation
openmct copied to clipboard

[Performance] Update eventemitter3 library version to improve performance

Open unlikelyzero opened this issue 3 years ago • 2 comments

Summary

We are currently using eventemitter3:1.2.0 https://github.com/nasa/openmct/blob/51e4c0c836fefd3853e3b611578012c60838bf64/package.json#L26 which is significantly behind the 4.x release. The 3.x release includes breaking changes. Output when attempting to install 3.1.7:

TypeError: emitter._events is undefined

Since this package was last implemented, several more eventEmitter libraries have replaced it with significant (10x) performance increases depending on the usecase.

In this ticket, we should investigate which eventEmitter library works best for VIPER and any other downstream consumers of openmct to decide which library we should use.

https://github.com/foxifyjs/events/tree/master/benchmarks appears to be the most performant and actively developed alternative at this time.

unlikelyzero avatar Jan 03 '22 22:01 unlikelyzero

@akhenry do you have any information on why drip wasn't picked over eventemitter3?

unlikelyzero avatar Jan 05 '22 14:01 unlikelyzero

Update: Updating to eventemitter2.0.0 causes the break

unlikelyzero avatar Mar 27 '24 22:03 unlikelyzero