-
Notifications
You must be signed in to change notification settings - Fork 819
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(opentelemetry-node): plugin loader search required cache #1807
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1807 +/- ##
==========================================
- Coverage 92.46% 92.46% -0.01%
==========================================
Files 173 173
Lines 6014 6012 -2
Branches 1287 1287
==========================================
- Hits 5561 5559 -2
Misses 453 453
|
I assume the failing test is due to #1799 (also not passing on master). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change need to be made in the instrumentation package too (sorry we are in the process of migrating the loader so there are redundant code)
@vmarchaud |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm, nice finding
Which problem is this PR solving?
Short description of the changes
require.resolve
once per plugin, and searching for the result inrequire.cache
object in O(1) instead of looping on the entire keys array