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

Additional load caused by library #22

Closed
riston opened this issue Apr 10, 2019 · 4 comments
Closed

Additional load caused by library #22

riston opened this issue Apr 10, 2019 · 4 comments

Comments

@riston
Copy link

riston commented Apr 10, 2019

Using this method to monitor event loop lag causes additional load to memory and CPU in my case this was about ~15%.

I started with a rather large threshold value five seconds, could that cause just filling the cache map with stack traces and now cleaning up that fast https://github.com/naugtur/blocked-at/blob/master/index.js#L4L4 ?

@naugtur
Copy link
Owner

naugtur commented Apr 10, 2019

The threshold shouldn't affect the performance or memory consumption.
This tool stores a stack trace for each async function and removes it once the function is done.
Hooks themselves are going to affect your app performance power nie initialized. That's expected.

@riston
Copy link
Author

riston commented Apr 15, 2019

Seems like it's not the issue with library itself but more the performance hit of using async hooks(https://github.com/bmeurer/async-hooks-performance-impact)

@naugtur
Copy link
Owner

naugtur commented Apr 15, 2019

I'm going to document the performance impact and explicitly explain this should not be run in production by default.

@naugtur
Copy link
Owner

naugtur commented Jul 26, 2019

warning added

@naugtur naugtur closed this as completed Jul 26, 2019
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