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
Improve runtime performance #333
Comments
4-bit*, 16 total.
Such as?
You mean memoizing?
But of course, let's indeed measure it. |
That should be based on performance measurement, but one idea is to not load
Yes
It has improved a lot in recent V8 versions. |
@IssueHunt has funded $100.00 to this issue.
|
@sindresorhus has rewarded $90.00 to @stroncium. See it on IssueHunt
|
Chalk is already fast enough for most usage. Benchmarks in readme's like this one are silly because no one will run Chalk in a constant loop, and second they're also false, because those packages do less things than Chalk, so of course they're faster. However, that doesn't mean we shouldn't try to be as fast as possible.
Some things we could consider:
chalk.red()
,chalk.bold.green()
, etc (Meaning only 16 colors). We could add some fast-paths for those cases.Proxy
. This would reduce our method usage, but might add different kinds of overhead. Needs to me measured.Solving this tasks should also include measuring performance in DevTools and improving the benchmark file in this repo.
Chalk targets Node.js 8, but the optimizations should target Node.js 10.
This is a difficult issue and if you want to tackle it you're expected to have a deep level of understanding of JS and be familiar with measuring performance in DevTools.
IssueHunt Summary
stroncium has been rewarded.
Backers (Total: $100.00)
Submitted pull Requests
Tips
IssueHunt has been backed by the following sponsors. Become a sponsor
The text was updated successfully, but these errors were encountered: