sassc is very slow to compile and install
When doing a `bundle install` for a new Rails 6 app, I noticed most of the time is spent compiling `sassc` (libsass really). This takes easily up to 2 minutes on Linux, which feels really slow for one gem. A bit of a Nokogiri-like experience if you see what I mean. Speaking of Nokogiri, they now have a prerelease gem installing in just 1 second, maybe we can use a similar approach? ``` $ ruby -v ruby 2.6.5p114 (2019-10-01 revision 67812) [x86_64-linux] $ time gem install sassc Building native extensions. This could take a while... Successfully installed sassc-2.2.1 1 gem installed 89.75s user 5.43s system 99% cpu 1:36.12 total ``` I'm not sure what's the best way to address this but here are some ideas: * Use the Makefile of libsass to build libsass as a shared library, and just link the C extension to it (as it used to be). * Use make parallelism automatically, e.g., by setting MAKEFLAGS * Distribute a binary gem on Linux and macOS. This requires having an easy workaround for non-glibc (e.g., alpine) to install from source, or not depending on on glibc (by linking the libc statically?). * Changes in libsass so it compiles faster, such as #132. * I thought the `-flto` might slow things down but actually it seems to speed up compilation with `g++ 8.3.1`! `time gem install sassc -- --disable-lto` takes `113.71s user 6.01s system 99% cpu 2:00.70 total`. Disabling all flags gives: `time gem install sassc -- --disable-lto --disable-march-tune-native --disable-s
Posted by eregon on Mar 8, 2020, 1:24 PM
Tags
Related issues
- Many devs love to shit on the guy from the 'I just want the exe.
- Now imagine how poor people stress if their smartphone bricks or gets damaged or lost.
- Resuming an extended-thinking session fails permanently with 400 "thinking blocks cannot be modified" (transcript stores thinking text as empty but keeps signat
- I'll preface this with a statement that as a European I want European alternatives to succeed, and MS-owned GitHub to shrivel and disappear.
- Yeah, but there’s a world of difference between “not perfect” and “we rounded a few sliders, and now the modal is a nightmare to use”.
- I used to write a lot of native Windows corporate software in the 90's and 2000's and my standard login window was a floating draggable o...
Raise real-world problems, find people facing the same issue, and discuss solutions.3,500 issues0 comments
reliability (SaaS)
Many devs love to shit on the guy from the 'I just want the exe.
Now imagine how poor people stress if their smartphone bricks or gets damaged or lost.
Resuming an extended-thinking session fails permanently with 400 "thinking blocks cannot be modified" (transcript stores thinking text as empty but keeps signat
I'll preface this with a statement that as a European I want European alternatives to succeed, and MS-owned GitHub to shrivel and disappear.
Yeah, but there’s a world of difference between “not perfect” and “we rounded a few sliders, and now the modal is a nightmare to use”.
I used to write a lot of native Windows corporate software in the 90's and 2000's and my standard login window was a floating draggable o...
App broken with Mosquitto broker 7.0.0
[BUG] Remote Control: automatic reconnection doesn't work -- connection drops silently with no recovery
sassc is very slow to compile and install
When doing a `bundle install` for a new Rails 6 app, I noticed most of the time is spent compiling `sassc` (libsass really). This takes easily up to 2 minutes on Linux, which feels really slow for one gem. A bit of a Nokogiri-like experience if you see what I mean. Speaking of Nokogiri, they now have a prerelease gem installing in just 1 second, maybe we can use a similar approach? ``` $ ruby -v ruby 2.6.5p114 (2019-10-01 revision 67812) [x86_64-linux] $ time gem install sassc Building native extensions. This could take a while... Successfully installed sassc-2.2.1 1 gem installed 89.75s user 5.43s system 99% cpu 1:36.12 total ``` I'm not sure what's the best way to address this but here are some ideas: * Use the Makefile of libsass to build libsass as a shared library, and just link the C extension to it (as it used to be). * Use make parallelism automatically, e.g., by setting MAKEFLAGS * Distribute a binary gem on Linux and macOS. This requires having an easy workaround for non-glibc (e.g., alpine) to install from source, or not depending on on glibc (by linking the libc statically?). * Changes in libsass so it compiles faster, such as #132. * I thought the `-flto` might slow things down but actually it seems to speed up compilation with `g++ 8.3.1`! `time gem install sassc -- --disable-lto` takes `113.71s user 6.01s system 99% cpu 2:00.70 total`. Disabling all flags gives: `time gem install sassc -- --disable-lto --disable-march-tune-native --disable-s
Comments (0)
No comments yet. Start the discussion.