Conversation
|
This is definitely a good idea! However I have a WIP PR that will remove npmlog and are-we-there-yet and gauge. It will add one new dependency proggy. Currently tests are not passing in that PR but as it gets close I would be interested in you taking a look at it for performance before it lands. |
|
Send me the branch, I can take a look and see if it will worth continuing the refactoring (by looking at the load time) |
|
The branch might even be completely broken at the moment. It's a WIP that I'm hoping to finish next week. |
|
Since you are working to remove |
|
Yes we will deprecate this module. PLEASE be involved as much as you want in the rewrite efforts. This is our overview issue where we're tracking and discussing the efforts: npm/statusboard#810 |
This is a very risky PR since it could break a lot of things but I think it is worthy to have.
The loading graph before:

The loading graph after:

The loading time using hyperfine before:
$ hyperfine --warmup 3 "node ./lib/log.js" Benchmark 1: node ./lib/log.js Time (mean ± σ): 114.9 ms ± 1.7 ms [User: 101.4 ms, System: 37.9 ms] Range (min … max): 111.9 ms … 117.6 ms 25 runsAfter:
$ hyperfine --warmup 3 "node ./lib/log.js" Benchmark 1: node ./lib/log.js Time (mean ± σ): 104.1 ms ± 2.0 ms [User: 91.6 ms, System: 34.4 ms] Range (min … max): 98.1 ms … 108.5 ms 29 runsI also added another method called
trackerRemoveAllListenersthat can be used to never load theare-we-there-yetat https://github.com/npm/cli/blob/latest/lib/utils/display.js#L114I think we should add more tests to
gaugeand also fortrackerthat didn't include mocked versions since I didn't even declaretrackerandgaugeduring the tests and it passed all the tests because they are mocked.