Skip to content
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

Don't recreate the class #57

Open
jimmywarting opened this issue Jul 24, 2021 · 0 comments
Open

Don't recreate the class #57

jimmywarting opened this issue Jul 24, 2021 · 0 comments
Assignees

Comments

@jimmywarting
Copy link
Contributor

jimmywarting commented Jul 24, 2021

V8 is unable to optimize this class if it's reconstructing it everytime.

ut_metadata/index.js

Lines 12 to 13 in b871aca

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...

@alxhotel alxhotel self-assigned this Jul 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants