V8 is unable to optimize this class if it's reconstructing it everytime.
|
module.exports = metadata => { |
|
class utMetadata extends EventEmitter { |
- The class should be moved to the top level.
- A
wire.ut_metadata instanceof check should work
Maybe should just get rid of the option to do: utMetadata(x) and instead use the wire.ut_metadata.setMetadata(x) method instead...
V8 is unable to optimize this class if it's reconstructing it everytime.
ut_metadata/index.js
Lines 12 to 13 in b871aca
wire.ut_metadata instanceofcheck should workMaybe should just get rid of the option to do:
utMetadata(x)and instead use thewire.ut_metadata.setMetadata(x)method instead...