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

Use sass-embedded to solve the optimizer performance issue with dart-sass #2331

Open
abbyhu2000 opened this issue Sep 12, 2022 · 3 comments
Open
Assignees
Labels
enhancement New feature or request

Comments

@abbyhu2000
Copy link
Member

Is your feature request related to a problem? Please describe.

This is a follow up issue to #2223

After changing from node-sass to dart-sass, the first time compilation time has increased exponentially (from around 50s to 400s). One possible solution is to add a node-fiber package to improve the performance (#2319). However, node fiber will only be supported with node 14. For node 16 and later versions, we can explore the option of using sass-embedded package.

Describe the solution you'd like

Better performance and shorter time for the first compilation

Additional context
https://www.npmjs.com/package/sass-embedded

@abbyhu2000 abbyhu2000 added the enhancement New feature or request label Sep 12, 2022
@abbyhu2000 abbyhu2000 self-assigned this Sep 13, 2022
@abbyhu2000
Copy link
Member Author

@AMoo-Miki I tried using embedded-sass, and the first compilation still took around 300s, which is not a lot of improvement from the original.
Screen Shot 2022-09-13 at 11 01 15 AM

@ashwin-pc
Copy link
Member

Hmm, this makes me wonder if the issue is not with how fast the sass compiler is, but rather how osd-optimizer compiles them. What fibers did was allow sync operations to happen asynchronously. Which must mean that we must have an inefficient optimizer loop thats bottlenecking us.

@AMoo-Miki
Copy link
Collaborator

For now, we have used a custom patched release of sass-loader and node-sass but this issue has to be revisited since node-sass is deprecated already.

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

No branches or pull requests

3 participants