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

Speed up digests with refinements #417

Closed
wants to merge 2 commits into from

Commits on Nov 4, 2016

  1. Speed up digests with refinements

    Huge thank you to @bouk who did all the work here.
    
    Running asset generation in a loop on codetriage.com
    
    ```
    task "assets:bench" do
      measure = []
    
      50.times do |i|
        puts "== Running (#{i})"
        measure << Benchmark.measure do
          `rm -rf tmp/cache/assets/sprockets/v4.0/ ; rm -rf public/assets; touch tmp; time RAILS_ENV=production bundle exec rake assets:precompile`
        end.real
      end
      puts "================ DONE ================"
      puts measure.join("\n")
    end
    ```
    
    I get these numbers:
    
    ```
                Avg         STDev
    Refinements 10.06318182 0.2621523045
    Hash        12.08513782 1.944694921
    ```
    
    Based on this refinements is faster than the current hash (8-16% in a real world assets:precompile app), but there is a high variance.
    schneems committed Nov 4, 2016
    Configuration menu
    Copy the full SHA
    7b5c2fc View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    372e517 View commit details
    Browse the repository at this point in the history