Conversation
|
Looking at CI |
Codecov Report
@@ Coverage Diff @@
## master #2626 +/- ##
==========================================
- Coverage 95.23% 95.19% -0.05%
==========================================
Files 31 30 -1
Lines 1512 1499 -13
Branches 429 428 -1
==========================================
- Hits 1440 1427 -13
Misses 72 72
Continue to review full report at Codecov.
|
|
Looks like some spacing diff in help output |
|
Try a rebase. |
|
hm looks like no help |
|
|
||
| const cli = new CLI(); | ||
| const optimizationFlags = cli.getBuiltInOptions().filter(({ name }) => name.startsWith('optimization-')); | ||
| const optimizationFlags = Object.values(cli.getBuiltInOptions().coreFlags).filter(({ name }) => name.startsWith('optimization-')); |
| } | ||
|
|
||
| const minimumHelpFlags = [ | ||
| const minimumHelpFlags = new Set([ |
There was a problem hiding this comment.
Perf here would have such little impact that there's no point. If there is 10000 objects I understand, but this is Max 30, so O(30ns) vs O(30^2) wouldnt make much difference
There was a problem hiding this comment.
we did a lookup for every flag, there could be ~300 flags
alexander-akait
left a comment
There was a problem hiding this comment.
Ideally we should reduce number of Object.entries/Object.values/Object.keys/etc
For example we can use this for help:
Object.entries(minimumHelpFlags).forEach(([name, meta]) => {
options[name].helpLevel = 'minimum';
});
So we avoid unnecessary looping over 1k options
|
Found more places to improve perf, I will finish it |
|
Big thanks! 👍 |
What kind of change does this PR introduce?
performance
Did you add tests for your changes?
existing
If relevant, did you update the documentation?
NA
Summary
Does this PR introduce a breaking change?
no
Other information