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

perf: use Domain API instead of async_hooks #58

Merged
merged 1 commit into from May 27, 2019
Merged

perf: use Domain API instead of async_hooks #58

merged 1 commit into from May 27, 2019

Conversation

B4nan
Copy link
Member

@B4nan B4nan commented May 27, 2019

After observing huge performance impact when using async_hooks when concurrent requests are involved, Domain API seems like much better fit for this task. Even though they are deprecated, they will most likely stay till another (stable) solution will be available.

So far async_hooks caused memory leaks even without ORM being involved. Simple express server with async_hooks tracing enabled created dozens of references in CONTEXT map without properly destroying them (the destroy hook was simply not called for those resource).

After observing huge performance impact when using async_hooks when concurrent requests are involved, Domain API seems like much better fit for this task. Even though they are deprecated, they will most likely stay till another (stable) solution will be available.

So far async_hooks caused memory leaks even without ORM being involved. Simple express server with async_hooks tracing enabled created dozens of references in CONTEXT map without properly destroying them (the destroy hook was simply not called for those resource).
@B4nan B4nan added this to the 2.6 milestone May 27, 2019
@coveralls
Copy link

coveralls commented May 27, 2019

Pull Request Test Coverage Report for Build 454

  • 7 of 7 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 100.0%

Totals Coverage Status
Change from base Build 449: 0.0%
Covered Lines: 2609
Relevant Lines: 2609

💛 - Coveralls

@B4nan B4nan merged commit 10b3196 into master May 27, 2019
@B4nan B4nan deleted the context branch May 27, 2019 21:22
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

Successfully merging this pull request may close these issues.

None yet

2 participants