-
Notifications
You must be signed in to change notification settings - Fork 31k
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
util: avoid run debug when enabled is false #57494
base: main
Are you sure you want to change the base?
Conversation
@@ -62,7 +62,7 @@ function lazyUtilColors() { | |||
return utilColors; | |||
} | |||
|
|||
function debuglogImpl(enabled, set, args) { |
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.
args
was never used
it can improve performace 700x faster
713532d
to
f6b4d12
Compare
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!
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #57494 +/- ##
==========================================
- Coverage 90.23% 90.22% -0.01%
==========================================
Files 629 629
Lines 184823 184849 +26
Branches 36203 36213 +10
==========================================
+ Hits 166780 166787 +7
- Misses 11013 11028 +15
- Partials 7030 7034 +4
🚀 New features to boost your workflow:
|
Once there are more than 2 inputs to the
debug logger
, e.g.:debug(1, 2, 3)
,there is a significant performance degradation.
This change can improve performance 700x faster.
Benchmark
Test script
Before
After