title: Rails 4: how to compile only changed assets?
body: <p>For Rails 3, <a href="https://stackoverflow.com/questions/9016002/speed-up-assetsprecompile-with-rails-3-1-3-2-capistrano-deployment">this question</a> and <a href="https://github.com/ndbroadbent/turbo-sprockets-rails3" rel="nofollow noreferrer">turbo-sprockets-rails3</a> look great.</p>
  
  <p>For Rails 4, there seems to be <a href="https://github.com/ndbroadbent/turbo-sprockets-rails3/issues/61" rel="nofollow noreferrer">some controversy</a> over whether this has been fixed or not.</p>
  
  <p>I'm currently using Rails 4 in production, and it seems that because Capistrano <code>deploy:assets:update_asset_mtimes</code> touches <em>all</em> assets, <code>deploy:assets:precompile</code> likewise re-compiles all of them. That recompilation is the single longest step in my <code>cap deploy</code>.</p>
  
  <p>Ideally, this should be replaced by some checksum based manifest system, so that only those assets that have actually changed (or are dependent on ones that have changed) are re-compiled.</p>
  
  <p>What is the best way to do this? (Assuming we're still doing it on the server, not the dev machine.)</p>