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

fix performance regression in the agent exporter #1119

Merged
merged 4 commits into from
Oct 19, 2020

Conversation

rochdev
Copy link
Member

@rochdev rochdev commented Oct 16, 2020

What does this PR do?

Fix performance regression in the agent exporter.

Motivation

Several performance issues were reported since the release of 0.19.0 which included a new custom msgpack encoder. I wasn't able to pinpoint exactly where the issue comes from since it looks like v8 is not properly optimizing this part of the code. To be safe, I reimplemented the 0.4 endpoint encoder with notepack pretty much as is, which is several times faster than msgpack-lite that was used in the past, so we still get better performance without custom code. For the 0.5 endpoint encoder, there is a lot more custom code but it's taken directly from notepack with minimal changes. The idea is that the closer our custom code is to a proven library, the less chances of introducing a regression.

@rochdev rochdev added enhancement New feature or request core labels Oct 16, 2020
@rochdev rochdev added this to the 0.27.0 milestone Oct 16, 2020
@rochdev rochdev requested a review from a team as a code owner October 16, 2020 20:49
packages/dd-trace/src/encode/0.5.js Show resolved Hide resolved
packages/dd-trace/src/encode/notepack.js Show resolved Hide resolved
packages/dd-trace/src/id.js Show resolved Hide resolved
packages/dd-trace/src/encode/0.4.js Outdated Show resolved Hide resolved
packages/dd-trace/src/encode/notepack.js Show resolved Hide resolved
@rochdev rochdev merged commit 9783a62 into master Oct 19, 2020
@rochdev rochdev deleted the test-msgpack-encoder-speed branch October 19, 2020 17:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants