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

chore: rebase "Optimise Imgix::Path#to_url by not generating the escaped query string twice" #109

Merged
merged 2 commits into from
Apr 8, 2021

Commits on Apr 8, 2021

  1. test: add benchmark script for Imgix::Path#to_url

    Output:
    
    ```
    ❯ bundle exec ruby script/bench_to_url.rb
    Warming up --------------------------------------
      Imgix::Path#to_url     1.683k i/100ms
    Calculating -------------------------------------
      Imgix::Path#to_url     16.886k (± 0.6%) i/s -     85.833k in   5.083431s
    ```
    stevehodgkiss authored and sherwinski committed Apr 8, 2021
    Configuration menu
    Copy the full SHA
    c168767 View commit details
    Browse the repository at this point in the history
  2. perf: avoid calculating path_and_params twice

    Benchmark output:
    
    ```
    ❯ bundle exec ruby script/bench_to_url.rb
    Warming up --------------------------------------
      Imgix::Path#to_url     2.731k i/100ms
    Calculating -------------------------------------
      Imgix::Path#to_url     27.278k (± 0.7%) i/s -    136.550k in   5.006213s
    ```
    stevehodgkiss authored and sherwinski committed Apr 8, 2021
    Configuration menu
    Copy the full SHA
    fa23d93 View commit details
    Browse the repository at this point in the history