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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[v4] "Done in xms" mismatch #13886

Closed
bep opened this issue Jun 23, 2024 · 1 comment
Closed

[v4] "Done in xms" mismatch #13886

bep opened this issue Jun 23, 2024 · 1 comment

Comments

@bep
Copy link

bep commented Jun 23, 2024

I have taken the v4 for a spin, and it's very impressive. I have one question/bug report.

  • The "Done in xms" reported at the end from the TailwindCSS CLI seems to be off by a factor of about 10 compared to the wall time reported by time.
  • What is this overhead and are there ways to improve this?
time npx tailwindcss -i assets/css/styles.css -o foo.css
≈ tailwindcss v4.0.0-alpha.16

Done in 24ms
npx tailwindcss -i assets/css/styles.css -o foo.css  0.29s user 0.07s system 99% cpu 0.362 total

The CSS file used as input:

@import "tailwindcss";

@theme {
  --color-*: initial;

  --color-blue-100: #3483eb;

  --color-gray-50: #f8fafc;
  --color-gray-100: #f1f5f9;
  --color-gray-200: #e2e8f0;

  /* ... */
  --color-green-800: #3f6212;
  --color-green-900: #365314;
  --color-green-950: #1a2e05;
}
@bep
Copy link
Author

bep commented Jun 23, 2024

OK, so dropping the npx, I get this:

 time ./node_modules/.bin/tailwindcss -i assets/css/styles.css -o foo.css
./node_modules/.bin/tailwindcss -i assets/css/styles.css -o foo.css  0.11s user 0.03s system 97% cpu 0.145 total

Which I guess is in line with the expected overehead of runnind NodeJS.

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

No branches or pull requests

1 participant