Skip to content
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

Amalgamate sassc library #132

Open
liamwhite opened this issue Jun 22, 2019 · 3 comments
Open

Amalgamate sassc library #132

liamwhite opened this issue Jun 22, 2019 · 3 comments

Comments

@liamwhite
Copy link

Please consider using a amalgamation of the libsass source for this repository.

One of my main complaints about this library is that it is excessively slow to compile. This isn't helped by the fact that I end up rebuilding it in CI occasionally, even despite providing a gem cache.

$ time gem install sassc
Building native extensions. This could take a while...
Successfully installed sassc-2.0.1
Parsing documentation for sassc-2.0.1
Done installing documentation for sassc after 0 seconds
1 gem installed

real	1m6.135s
user	1m1.721s
sys	0m2.371s

In order to remedy this, I experimented with amalgamation of the libsass source files, and found that this provided a huge improvement in compile times.

$ time gem install sassc-2.0.1.custom.gem 
Building native extensions. This could take a while...
Successfully installed sassc-2.0.1.custom
Parsing documentation for sassc-2.0.1.custom
Done installing documentation for sassc after 1 seconds
1 gem installed

real	0m12.271s
user	0m11.410s
sys	0m0.457s

I created the amalgamation in that repository using this shell script, however other repositories generally have custom tools that do this for them.

@glebm
Copy link
Contributor

glebm commented Aug 23, 2019

Strange but I haven't been able to get nearly as much speed up.
Still good though, went from 60s to 30s when compiling single-core.

@liamwhite
Copy link
Author

@glebm might be related to single-core performance. My computer has an i7 4790K with a 4GHz base clock and 4.4GHz boost clock.

@glebm
Copy link
Contributor

glebm commented Aug 23, 2019

I have the exact same CPU. One difference is that my amalgamation script puts everything into a cpp file (no header) but I don't imagine that would make much difference. Perhaps the compilation flags I used are different.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants