Middleman Autoprefixer is slow for me

Has anyone had luck making Sass + Autoprefixer fast?

On page refresh I’m seeing 3+ seconds for CSS compilation, rest of pipeline is about 100ms.

When I turned off Autoprefixer in config.rb CSS compiled in 100-200ms, about the same speed as my Slim templates and other Sprockets pipeline stuff.

From Gemfile.lock:

Using autoprefixer-rails 6.0.3
Using middleman-core 4.0.0.rc.2
Using middleman 4.0.0.rc.2
Using middleman-autoprefixer 2.6.1 from git://github.com/middleman/middleman-autoprefixer.git (at master)
Using middleman-livereload 3.4.3
Using sprockets 3.4.1
Using middleman-sprockets 4.0.0.rc.1

We were similarly frustrated by how fast Sass compiles happened, but it seems that when you’re using Ruby to compile Sass, there’s a certain inherent speed limit.

Perhaps more of a workaround than a full solution, but it has worked pretty well for us to switch to Gulp and do the Sass compilation outside of Middleman. Perhaps it’ll be worth a try for you, too.

I followed your advice! https://github.com/NathanBowers/mm-template