-
Notifications
You must be signed in to change notification settings - Fork 97
Some optimizations for component detection #1384
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
Conversation
This reverts commit dc9be95.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1384 +/- ##
=======================================
- Coverage 89.6% 89.6% -0.1%
=======================================
Files 401 401
Lines 31821 31811 -10
Branches 1965 1966 +1
=======================================
- Hits 28539 28528 -11
Misses 2863 2863
- Partials 419 420 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
src/Microsoft.ComponentDetection.Common/DependencyGraph/ComponentRecorder.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.ComponentDetection.Contracts/TypedComponent/TypedComponent.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.ComponentDetection.Detectors/yarn/YarnLockComponentDetector.cs
Show resolved
Hide resolved
src/Microsoft.ComponentDetection.Contracts/TypedComponent/TypedComponent.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.ComponentDetection.Common/DependencyGraph/ComponentRecorder.cs
Show resolved
Hide resolved
src/Microsoft.ComponentDetection.Common/DependencyGraph/ComponentRecorder.cs
Show resolved
Hide resolved
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.
Waiting just for the bump of the yarn detector version.
👋 Hi! It looks like you modified some files in the
If none of the above scenarios apply, feel free to ignore this comment 🙂 |
In a large 1JS repository, we have ~38% performance improvement (71s => 44s)
Notable gains are obtained from:
For (1), it is possible because
OnFileFoundAsync
for Yarn detector is thread safe. For (2), it is better to replace allset
methods in properties toinit
, but the latter is not available for netstandard.On large 1JS repository, the following show before and after for this command
on 1JS codespaces
Before
After
Other perf. gain can be obtained by doing the following:
Newtonsoft.Json
withSystem.Text.Json