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
Allow dart-sass DartVM executable rather than pure-js. #15899
Comments
Are you experiencing performance issues? The Have you performed speed comparisons with the Sass within your project between the JS version (with fibers) and the Dart version? Both can be run directly on the files via the command line. Benchmark data is always of use and interest to the team. It's also important to consider that for the vast majority of applications, the processing of the JS code itself will consume the overwhelming majority of the build time. Poor stylesheet processing time can also be due to multiple or large imports of non-mixin/variable partials. This is especially relevant to component stylesheets as each is processed in an isolated context. For example, adding |
Thanks @clydin ! Yeah I'm experiencing performance issues, and in my case it seems over 70% of the time is spent on sass source maps. Yes, I've done a speed comparison via the command line, and I've found that the the Dart version is about 4x faster than the JS version. Putting Dart aside, the bigger issue in my case seems to be that the Angular CLI takes way longer than running directly via the command line. I had one large file (with many imports) that takes about 4 seconds to compile via So this makes me wonder, what is the Angular CLI spending so much time on that it takes 30 seconds rather than 4 seconds? |
Would you happen to have a log output from the troublesome builds? The webpack logs have a tendency to show the last action that was completed rather than what is currently being done. |
A webpack log that's different form the console output during build? Do you know where I would find that? |
The console output if that is what is showing the issue you've encountered. |
For security reasons I can't post a whole console log, but basically I'll run
there's a notice
Then many
And then the issue it is spends a lot of time here:
|
What I'm wondering is, when the Angular CLI is doing this (which takes ~30 seconds):
Is that supposed to be the same work essentialy as this? (which takes ~4 seconds):
What else is the Angular CLI doing in this "building" step aside from sass compilation? |
Sorry, I've let this issue get derailed a little with my particular situation. This ticket should remain focused on finding a way to use the DartVM executable rather than the pure-js version of dart-sass. |
To address your previous question, every JS, TS, and stylesheet file (including third party dependencies) is considered a module. The displayed file is also the last active module and not necessarily what webpack is currently processing. From the log output there are also 2 active modules which means two different files were being processed when that status was updated and one of which being the one shown. That Sass file could also be unluckily processed right before a large JS file from a dependency; some of which can be megabytes in size. As to using the Dart version directly, that would probably best be a feature request of |
Thanks! I've opened an issue there: webpack-contrib/sass-loader#774 |
I'm going to close this issue as there does not appear to be anything actionable from an Angular CLI perspective. Any new versions of |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
🚀 Feature request
Command (mark with an
x
)Description
Angular currently uses the slow compiled-to-pure-js implementation of dart-sass.
Describe the solution you'd like
There should be an option (in
angular.json
) to use the fast DartVM executable for dart-sass.The text was updated successfully, but these errors were encountered: