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

dependencies: merge performance #33

Closed
vmarchaud opened this issue May 9, 2018 · 4 comments
Closed

dependencies: merge performance #33

vmarchaud opened this issue May 9, 2018 · 4 comments

Comments

@vmarchaud
Copy link
Contributor

vmarchaud commented May 9, 2018

Problem Summary

The merge module is slow, the cli that i'm building depend on it to render few lines, i'm seing a ~4x difference between Object.assign and merge :
Object.assign:

/home/vmarchaud/****/bin/pmp.js status  0,48s user 0,04s system 40% cpu 1,276 total

Merge:

/home/vmarchaud/****/bin/pmp.js status  2,06s user 0,06s system 78% cpu 2,696 total

Expected Result (screen shot if possible)

image

Actual Result (screen shot if possible)

image

Environment Information

  • OS: Uubuntu 17.10

  • Terminal Emulator:
    Vscode (xterm.js)

Steps to Reproduce

  1. Have a CLI using tty-table
  2. Replace Merge here by Object.assign
  3. Profit

Conclusion

Would it be possible to use Object.assign when available ? I dont mind making a PR if needed

@vmarchaud
Copy link
Contributor Author

Actually i made a PR : #34

@tecfu
Copy link
Owner

tecfu commented May 12, 2018

Merged #34

@tecfu
Copy link
Owner

tecfu commented May 12, 2018

Thanks @vmarchaud

@vmarchaud
Copy link
Contributor Author

Happy to give back ! Thanks for your module too :)

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