Skip to content
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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

perf: swap chalk for turbocolor #651

Closed
wants to merge 1 commit into from
Closed

perf: swap chalk for turbocolor #651

wants to merge 1 commit into from

Conversation

jorgebucaran
Copy link

@jorgebucaran jorgebucaran commented Jul 15, 2018

Summary

What kind of change does this PR introduce? (check at least one)

  • Refactor
  • Other, please describe: package swap to another

Does this PR introduce a breaking change? (check one)

  • No

Hello @yyx990803 and maintainers! 馃憢

This PR only swaps chalk for Turbocolor.

Turbocolor loads >20x faster and applies styles >18x faster than chalk for the same API (see benchmarks). So, it should give you a small perf boost.

Let me know if this works for you. Cheers!

# Load Time
chalk: 15.190ms
turbocolor: 0.777ms

# All Colors
chalk 脳 8,729 ops/sec
turbocolor 脳 158,383 ops/sec

# Chained Colors
chalk 脳 1,838 ops/sec
turbocolor 脳 39,830 ops/sec

# Nested Colors
chalk 脳 4,049 ops/sec
turbocolor 脳 59,833 ops/sec

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant