CodeOverload
CodeOverload

Reputation: 48485

Rails Sass compiles too slow in a fast development machine

My computer runs at 3.6ghz with 12gb of RAM, and uses Windows 7 and RailsInstaller for developing Rails apps.

Back when i used pure css, there was no issue, but when i started using Sass and Compass, i have to wait over 10-15 seconds when i refresh to see new changes. (that only happens when i edit a .scss file)

Anyone knows what causes this on a fairly fast machine?

Upvotes: 8

Views: 4389

Answers (2)

Tonys
Tonys

Reputation: 3399

The sass compile times became significantly longer with the update from sass 3.1.x to 3.2.x.
There seems to be a specific concern as per Roman's response above, it's caused if you use @extend in deeply nested selectors since '@extend' does a lot of processing work. Here is the link to a currently open issue on the sass project on github for this exact problem.

That being said, the reports on that issue is more like 90-100 sec compile times (104sec for my own personal project that uses @extend alot to pull in foundation/bootstrap classes). So, if you're experiencing 9-10sec lags, yours might just be a general issue with the newest update being generally slower in compile times.

Upvotes: 3

Roman Pominov
Roman Pominov

Reputation: 1433

In my case it was because of too frequent use of the @extend directive.

Upvotes: 1

Related Questions