3 ms·
Good comment by one of the Chalk maintainers https://github.com/babel/babel/pull/13783#issuecomment-927317201 https://github.com/babel/babel/pull/13783#issueco
by arduinomancer 5y ago
Good comment by one of the Chalk maintainers
https://github.com/babel/babel/pull/13783#issuecomment-927317201 https://github.com/babel/babel/pull/13783#issuecomment-92731...
- akagusu 5y agoOuch!
- ergocoder 5y agoI don't think the main message from chalk maintainers is good. Chalk maintainers basically discard the performance improvement as micro-benchmarking (i.e. "doesn't matter in the real world"). Chalk maintainers also say tree shaking doesn't matter in the real world. Why do they minimize these 2 improvements? If 2 libraries are equivalent, I'd go with the ones with extra improvements. Chalk maintainers also mentioned that chalk would have no dependencies soon (not now, but soon). They also mentioned that chalk is well maintained for over 10y. So, over the past decade, they can't remove dependencies? Suddenly, nanocolors show up, and now they will remove dependencies soon? That doesn't sound well-maintained. Speed/tree-shaking aside, having no dependencies is a huge improvement.
- n_e 5y ago> Chalk maintainers basically discard the performance improvement as micro-benchmarking (i.e. "doesn't matter in the real world"). Chalk maintainers also say tree shaking doesn't matter in the real world. Chalk’s purpose is to color things printed to the terminal. Unless it’s performance is atrocious, which I doubt, it doesn’t matter unless a ridiculous amount of data is printed. > Chalk maintainers also say tree shaking doesn't matter in the real world No, they say it doesn’t matter for chalk’s use case. Which is command-line tools that are almost never tree-shaken.
- ergocoder 5y ago> Chalk’s purpose is to color things printed to the terminal. Unless it’s performance is atrocious, which I doubt, it doesn’t matter unless a ridiculous amount of data is printed. Chalk is downloaded 15 millions per day. We probably can multiply how much time has wasted from 15 millions run per day. It matters collectively. > No, they say it doesn’t matter for chalk’s use case. Which is command-line tools that are almost never tree-shaken. Are you saying people don't package the terminal app when written in Node.js? It matters in some cases, and it doesn't matter in some. Chalk maintainers try to brush off these improvements, which seem like bad intents, tbh.
- samastur 5y agoI don't have a horse in this race, but I am a bit bothered by two arguments, because I see variations on them so often (so this is less of a reply to you personally). > Chalk is downloaded 15 millions per day. > We probably can multiply how much time has wasted from 15 millions run per day. It matters collectively. If I give you back 5 seconds each day, will it matter to you? Will you be able to enjoy or do something that you otherwise wouldn't? I doubt it. I am certain that is true practically every person in those 15 millions. The cumulative loss of something can be huge, but still don't matter because its distributed to a degree where it is barely a rounding error. > Are you saying people don't package the terminal app when written in Node.js? Details matter. Chalk is ~100K and nanocolors is 16K. Yes, 90K is meaningless saving for a terminal app.
- ergocoder 5y ago> The cumulative loss of something can be huge, but still don't matter because its distributed to a degree where it is barely a rounding error. Are you claiming it doesn't matter to anyone or just you? > If I give you back 5 seconds each day, will it matter to you? Will you be able to enjoy or do something that you otherwise wouldn't? I'd welcome the time back since I don't lose anything in return anyway. So, a big YES here. Generally I would put faster library as a plus. Working in a big company, when choosing between 2 open sources, we will need to list down pros and cons. Among other things, being 4x smaller is definitely one of the plus consideration. I try not to exaggerate this; it's not a major plus, but a plus nonetheless Saying these doesn't matter is disingenuous. To you, maybe, but not for most. If everything else is equal, you would choose chalk despite it is 4x bigger in size and slower? Most will choose the smaller and faster library.