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
sassc using large amount of memory with libsass 3.6.3 #3033
Comments
|
node-sass using libsass 3.5.5 compiled it under 2 seconds: |
|
With libsass master (d91105 which is 3.6.3 plus 4 commit) there are lots of warnings: 3.6.1 seems to be fine. |
|
This is a deprecation notice we introduced.
…On Wed, 6 Nov 2019, 1:06 pm Marcin Cieślak, ***@***.***> wrote:
With libsass master (d91105 which is 3.6.3 plus 4 commit) there are lots
of warnings:
Compound selectors may no longer be extended.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#3033?email_source=notifications&email_token=AAENSWHITUBZQOXGH3HP6A3QSIRDBA5CNFSM4JJHWCYKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEDE72PQ#issuecomment-550108478>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAENSWGZIF6OW7BYJGI2DX3QSIRDBANCNFSM4JJHWCYA>
.
|
|
@xzyfer but is this feature still supported? it seems that extension process is causing trouble here (according to the debugger) |
|
Has anyone tried it with dart sass, I suspect it will run into the same issue. |
|
AFAIR that gtk theme has quite a few |
|
Nope, dart is not even running on my system. |
|
Does it ever finish? I poked around it with a debugger and it seems to jump around extending stuff; it also does not seem to endlessly recurse. |
|
I believe it will finish if you have an absurd amount of RAM. It seems to even exhaust 64GB. But the real issue is that the extend rules for this theme are really getting out of hand and probably don't work as they have been intended. Not sure exactly how or why older libsass extend was working but I suspect that we didn't obey the 3rd law of extend (It trims redundant selectors as much as possible, while still ensuring that the specificity is greater than or equal to that of the extender). FWIW I was able to compile |
|
Similar problem with the default gtk CSS theme: https://gitlab.gnome.org/GNOME/gtk/issues/2237 sassc used to create a 192kb CSS file and starting with 3.6.3 (3.6.2 got into an endless loop) the resulting CSS is 70MB large. |
|
It seems to boil down to some usage pattern like these: %undecorated_button {
box-shadow: none;
}
button:link:hover, button:visited:hover,
button:link:active, button:visited:active,
button:link:checked, button:visited:checked {
@extend %undecorated_button;
}
headerbar {
@extend %header_widgets;
}
%header_widgets {
&.selection-mode button {
&, &.flat {
asd: qwe;
}
&:active, &:checked { @extend :active; }
&:disabled {
@extend :disabled;
&:checked, &:active { @extend :disabled, :checked; }
}
}
}I would suggest to take this upstream to dart-sass, as it suffers from the same issue. |
|
Here is an example which produces a bogus result starting with 3.6.2: *:hover {
*:visited {
color: green;
}
}
button {
@extend *:hover;
} |
|
Is there a relatively current sass language specification? I think we have reached the point here where just following the reference implementation leads to wrong results. |
|
@saper There's a partial spec in https://github.com/sass/sass/tree/master/spec. It gets filled in lazily as necessary when writing proposals for new language features. |
|
Is there a proposed resolution for this? I shipped Libsass 3.6.2 but had to rollback after many reports of hung compiling. It seems this issue is likely to affect many people, so I’m hesitant to ship 3.6.3 now. |
|
No, there hasn't, but the hung compilation was another issue that should be addressed correctly in 3.6.3. The issue here is how the exend logic of dart sass works. Edit: it seems the main problem is the difference between e.g. |
They are no longer supported by sass and broken with libsass 3.6.3 (sass/libsass#3033) This removes some of them by replacing them with a placeholder selector. This at least brings the resulting CSS size down a bit so gtk can be build again. The remaining cases I don't know how to convert because I haven't found a way to reproduce the old output. The CSS was generated with libsass 3.5.5. See #2237
They are no longer supported by sass and broken with libsass 3.6.3 (sass/libsass#3033) This removes them by replacing them with a placeholder selector. This at least brings the resulting CSS size down a bit so gtk can be build again. `%button.flat.suggested-action` has been replaced by `%selection_mode_button_flat`, which is a more appropriate selector for `.selection-mode button.titlebutton`. The CSS was generated with libsass 3.5.5. Co-authored-by: Christoph Reiter <reiter.christoph@gmail.com> See https://gitlab.gnome.org/GNOME/gtk/issues/2237
|
I can confirm that 3.6.3 hangs and keeps eating memory until it invokes OOM killer. Void Linux |
sass/libsass#3033 Signed-off-by: Matteo Bernardini <ponce@slackbuilds.org>
sass/libsass#3033 Signed-off-by: Matteo Bernardini <ponce@slackbuilds.org>
sass/libsass#3033 Signed-off-by: Matteo Bernardini <ponce@slackbuilds.org>
sass/libsass#3033 Signed-off-by: Matteo Bernardini <ponce@slackbuilds.org>
sass/libsass#3033 Signed-off-by: Matteo Bernardini <ponce@slackbuilds.org>
sass/libsass#3033 Signed-off-by: Matteo Bernardini <ponce@slackbuilds.org>
|
Closing this out as it is as it is. Since LibSass follows the lead of now official dart sass, and this same problem exists there, we can't do much to fix. This behavior is intrinsically related to how dart sass now handles |

I am attempting to build the latest release of arc-theme, which has a build dependency on sassc/libsass.
With libsass 3.6.2, the build was hanging, very likely due to this issue. With libsass 3.6.3, sassc starts to consume large amounts of memory. I don't know if the build would successfully complete, because my system was about to run out of memory; sassc was using about 14 GB of RAM when I killed the process.
Steps to reproduce:
The text was updated successfully, but these errors were encountered: