Skip to content

Switch to sassc-rails

What does this MR do?

It replaces the sass-rails gem with the sassc-rails gem for faster compilation.

Are there points in the code the reviewer needs to double check?

No, the diff is straightforward.

Why was this MR needed?

It was requested in issue #18432 (closed), and generally faster compilation is a good thing :)

Does this MR meet the acceptance criteria?

What are the relevant issue numbers?

Closes #18432 (closed)

More information

Without attempting to be very scientific here are some numbers I got:

Using sassc-rails:

[1] pry(main)> Benchmark.bm { |bm| bm.report { Rails.application.assets["application.css"] } }
user system total real
1.430000 0.380000 1.810000 ( 1.830753)

Using sass-rails:

[1] pry(main)> Benchmark.bm { |bm| bm.report { Rails.application.assets["application.css"] } }
user system total real
12.320000 0.530000 12.850000 ( 12.909684)

The result is faster page loads when changing CSS in development and faster precompilation.

Merge request reports