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

css.preprocessorMaxWorkers = true #1

Open
sapphi-red opened this issue Jul 24, 2024 · 1 comment
Open

css.preprocessorMaxWorkers = true #1

sapphi-red opened this issue Jul 24, 2024 · 1 comment

Comments

@sapphi-red
Copy link

Making an issue here instead as I feel it's a bit off-topic from the PR (vitejs/vite#17728).

I saw this comment here.

// it doesn't seem affect much
// functions: {
// '__force_no_worker()'() {}
// },

Just in case, did you put css.preprocessorMaxWorkers = true? Otherwise, adding that won't change anything.

Example: https://github.com/vitejs/vite/blob/66bdb1d7b41e46b5361606ff3811bdad6f625bcc/playground/css/vite.config.js#L85

@hi-ogawa
Copy link
Owner

Good point. I think I've toggled it a few times, but probably not in this example.
I updated README.md to include the build time with and without preprocessorMaxWorkers. The changes looks like this:

  • sass-embedded x modern 575ms -> 937ms (slower)
  • sass x modern 2.75s -> 1.76s (faster)
  • sass x legacy 3.42s -> 2.04s (faster)

sass improved as expected, but sass-embedded might be suffering overhead of each dart process.

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

2 participants