Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Commits on Mar 1, 2015
  1. Santiago Pastorino

    Merge pull request #809 from tgxworld/reduce_allocations

    spastorino authored
    Reduce allocations
  2. Eileen M. Uchitelle

    Remove check for `nil` on `qs`

    eileencodes authored
    Fixed by brynary/rack-test@4a4b2c1. rack-test was turning the query
    string to nil if there was no argument passed in the params. This extra
    `nil` check is no longer necessary after the changes made to the
    rack-test gem. Fixes issue brought up in #800.
Commits on Feb 25, 2015
  1. Guo Xiang Tan

    Prefer String concatenation.

    tgxworld authored
    Before:
    ```
    [["rack/lib/rack/utils.rb", 280, :T_STRING], [12004, 0, 11304, 0, 1, 463840]]
    ```
    
    After:
    ```
    [["rack/lib/rack/utils.rb", 280, :T_STRING], [5996, 0, 5706, 0, 2, 232320]]
    ```
  2. Guo Xiang Tan

    Reduce String allocations by storing common seperators in a constant.

    tgxworld authored
    Before:
    ```
    [["rack/lib/rack/utils.rb", 87, :T_STRING], [111173, 57, 106670, 0, 27, 12654156]]
    [["rack/lib/rack/utils.rb", 115, :T_STRING], [30244, 58, 29580, 0, 27, 3275248]]
    ```
    
    After:
    ```
    [["rack/lib/rack/utils.rb", 88, :T_STRING], [20979, 136, 21178, 0, 27, 1677320]]
    [["rack/lib/rack/utils.rb", 116, :T_STRING], [8995, 137, 9943, 0, 27, 581392]]
    ```
  3. Guo Xiang Tan

    Reduce Array allocations.

    tgxworld authored
    Before
    ```
    [["rack/lib/rack/utils.rb", 116, :T_ARRAY], [11988, 0, 11663, 0, 2, 463840]]
    ```
    
    After
    ```
    [["rack/lib/rack/utils.rb", 116, :T_ARRAY], [6002, 0, 5624, 0, 2, 232640]]
    ```
  4. Guo Xiang Tan

    Reduce String allocations.

    tgxworld authored
    Before:
    ```
    [["rack/lib/rack/utils.rb", 89, :T_STRING], [41986, 0, 40154, 0, 2, 1627920]]
    [["rack/lib/rack/utils.rb", 116, :T_STRING], [17982, 0, 17490, 0, 2, 695760]]
    ```
    
    After:
    ```
    [["rack/lib/rack/utils.rb", 89, :T_STRING], [27000, 0, 25875, 0, 1, 1046880]]
    [["rack/lib/rack/utils.rb", 116, :T_STRING], [12000, 0, 11283, 0, 2, 465120]]
    ```
Commits on Feb 19, 2015
  1. Aaron Patterson

    Merge branch 'master' into soulim-even-less-objects

    tenderlove authored
    * master: (53 commits)
      Update documentation of Rack::Response defaults
      Reduce string allocations.
      Clean up `@names` hash
      Don't pass arguments to `#each`
      Freeze 'X-Runtime' string
      Reduce object allocation.
      Fix bug when `qs` is `nil`
      Update license with up-to-date year
      Use default bundle install command.
      Reduce object allocations in Rack::Utils
      add office related Mime type
      fix typo
      Remove whitespaces
      Add woff2 mime type
      Update head.rb
      Fix spec versions in all handler files
      Run all the tests on ci, we have the pkgs
      Oh look, no one has run fulltest for so long
      did you know you could use turtles to shave yaks?
      Update travis.yml since we added bundler and stuff
      ...
    
    Conflicts:
    	lib/rack/file.rb
  2. Aaron Patterson

    Merge pull request #794 from jakimowicz/add_office_extensions

    tenderlove authored
    add office related Mime type
  3. Aaron Patterson
  4. Aaron Patterson

    Merge pull request #802 from eileencodes/freeze-x-runtime-strings-to-…

    tenderlove authored
    …reduce-allocations
    
    Freeze 'X-Runtime' string
  5. Aaron Patterson

    Merge pull request #803 from eileencodes/dont-pass-arguments-to-each

    tenderlove authored
    Don't pass arguments to `#each`
  6. Aaron Patterson
  7. Aaron Patterson

    Merge pull request #801 from tgxworld/reduce_object_allocation

    tenderlove authored
    Reduce object allocation.
  8. Aaron Patterson

    Merge pull request #805 from tgxworld/reduce_string_allocations

    tenderlove authored
    Reduce string allocations.
  9. Tom Stuart

    Update documentation of Rack::Response defaults

    tomstuart authored
    The “containing HTML” remark stopped being true in 3623d04, as reflected by https://github.com/rack/rack/blob/master/test/spec_response.rb#L5-L21.
  10. Guo Xiang Tan

    Reduce string allocations.

    tgxworld authored
    Before total allocations = 69010
    ```
    [[rack/lib/rack/utils.rb", 314, :T_STRING], [39000, 22, 38009, 0, 27, 2536600]]
    [[rack/lib/rack/utils.rb", 312, :T_STRING], [12004, 0, 11518, 0, 2, 464800]]
    [[rack/lib/rack/utils.rb", 313, :T_STRING], [18006, 0, 17274, 0, 1, 2803325]]
    ```
    
    After total allocations = 45000
    ```
    [[rack/lib/rack/utils.rb", 315, :T_STRING], [45000, 41, 45338, 0, 28, 4160731]]
    ```
Commits on Feb 18, 2015
  1. Eileen M. Uchitelle

    Clean up `@names` hash

    eileencodes authored
    Tidies up the `@names` hash so we don't need to store as much in it.
  2. Eileen M. Uchitelle

    Don't pass arguments to `#each`

    eileencodes authored
    Nothing is actually passed to `#each` so we shouldn't be passing `*args`.
    This change eliminates proc and array allocations here.
    
    Before this change `#each` on rack/lib/rack/body_proxy.rb:34 was number
    3 in highest allocations for Rails integration tests. After this change it's
    no longer in the top 5.
  3. Eileen M. Uchitelle

    Freeze 'X-Runtime' string

    eileencodes authored
    Move 'X-Runtime' to a constant and freeze. Combine with other
    `FORMAT_STRING` constant used in the class.
    
    We are freezing these strings to reduce the number of allocations in
    Rails integration tests. The tests are spending a lot of time in GC and
    this reduces the amount of time spent from 12% to 9% (in combination
    with Rails PR that also freezes some strings).
    
    Strings allocated before this change: 1030722
    Strings allocated after this change: 1024722
  4. Guo Xiang Tan

    Reduce object allocation.

    tgxworld authored
    Before:
    ```
    [[".rbenv/versions/2.2.0/lib/ruby/2.2.0/uri/common.rb", 383, :T_STRING], [113158, 342, 114877, 0, 28, 5989110]]
    [["rack/lib/rack/utils.rb", 87, :T_STRING], [110615, 57, 108492, 0, 28, 12576892]]
    [["rails-dev-box/rails/activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb", 243, :T_STRING], [59564, 0, 58024, 0, 1, 2304160]]
    [["rack/lib/rack/utils.rb", 89, :T_ARRAY], [56601, 0, 55128, 0, 2, 2189560]]
    [["rails-dev-box/rails/actionpack/lib/action_controller/metal/strong_parameters.rb", 541, :T_STRING], [54652, 0, 53229, 0, 2, 5830250]]
    [["rails-dev-box/rails/activesupport/lib/active_support/subscriber.rb", 99, :T_STRING], [53606, 0, 52222, 0, 1, 2073520]]
    [["rails-dev-box/rails/activesupport/lib/active_support/notifications/instrumenter.rb", 52, :T_HASH], [50621, 16, 49447, 0, 22, 8126520]]
    [["rack/lib/rack/utils.rb", 89, :T_STRING], [41706, 0, 40620, 0, 2, 1613360]]
    [["rails-dev-box/rails/activesupport/lib/active_support/notifications/fanout.rb", 55, :T_DATA], [41694, 0, 40618, 0, 1, 4676888]]
    [["rails-dev-box/rails/activerecord/lib/active_record/relation/query_methods.rb", 56, :T_ARRAY], [41690, 0, 40612, 0, 1, 1612560]]
    ```
    After:
    ```
    [[".rbenv/versions/2.2.0/lib/ruby/2.2.0/uri/common.rb", 383, :T_STRING], [113994, 348, 116830, 0, 28, 6032912]]
    [["rack/lib/rack/utils.rb", 87, :T_STRING], [111363, 58, 110247, 0, 28, 12668100]]
    [["rails-dev-box/rails/activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb", 243, :T_STRING], [59996, 0, 58968, 0, 1, 2321120]]
    [["rails-dev-box/rails/actionpack/lib/action_controller/metal/strong_parameters.rb", 541, :T_STRING], [54964, 0, 54050, 0, 1, 5870020]]
    [["rails-dev-box/rails/activesupport/lib/active_support/subscriber.rb", 99, :T_STRING], [53990, 0, 53070, 0, 1, 2088880]]
    [["rails-dev-box/rails/activesupport/lib/active_support/notifications/instrumenter.rb", 52, :T_HASH], [50989, 11, 50231, 0, 25, 8188064]]
    [["rails-dev-box/rails/activerecord/lib/active_record/relation/query_methods.rb", 56, :T_ARRAY], [42006, 0, 41282, 0, 1, 1624960]]
    [["rack/lib/rack/utils.rb", 89, :T_ARRAY], [42002, 0, 41278, 0, 2, 1624880]]
    [["rack/lib/rack/utils.rb", 89, :T_STRING], [42002, 0, 41279, 0, 2, 1624880]]
    [["rails-dev-box/rails/activesupport/lib/active_support/notifications/fanout.rb", 55, :T_DATA], [42000, 0, 41286, 0, 1, 4712384]]
    ```
Commits on Feb 17, 2015
  1. Eileen M. Uchitelle

    Fix bug when `qs` is `nil`

    eileencodes authored
    In c4596b3 I failed to test Rails tests and in working on other issues
    discovered some Rails ActionPack tests weren't erroring. I found that
    sometimes `qs` is nil so I changed this to check for `qs.nil? || qs.empty?`.
Commits on Feb 11, 2015
  1. Eileen M. Uchitelle

    Reduce object allocations in Rack::Utils

    eileencodes authored
    Using AllocationTracer we were able to find unnecessary allocations of
    objects.
    
    1) `[]=` is duping the hash key object on assignment. Frezing
    `k.downcase` will prevent this.
    
    2) `parse_nested_query` was taking unnecessary steps when the string was
    empty. We can just return a `{}` instead if `qs` is empty.
    
    AllocationTracer object allocation before these changes:
    ```
    [["/rack/lib/rack/utils.rb", 500, :T_STRING], [56981, 4303, 78980, 0, 13, 2032240]]
    [["/rack/lib/rack/utils.rb", 498, :T_STRING], [51000, 0, 45775, 0, 2, 1904680]]
    [["/rack/lib/rack/utils.rb", 114, :T_STRING], [39123, 0, 35116, 0, 1, 4711600]]
    [["/rack/lib/rack/utils.rb", 661, :T_STRING], [32993, 0, 29621, 0, 1, 1232289]]
    [["/rack/lib/rack/body_proxy.rb", 34, :T_ARRAY], [30000, 0, 26930, 0, 1, 1120400]]
    ```
    AllocationTracer object allocation after these changes:
    ```
    [["/rack/lib/rack/utils.rb", 499, :T_STRING], [46665, 969, 54210, 0, 13, 1702720]]
    [["/rack/lib/rack/utils.rb", 662, :T_STRING], [31375, 0, 30647, 0, 2, 1175369]]
    [["/rack/lib/rack/body_proxy.rb", 34, :T_ARRAY], [28550, 0, 27880, 0, 2, 1068800]]
    [["/rails/activesupport/lib/active_support/subscriber.rb", 99, :T_STRING], [28534, 0, 27869, 0, 2, 1068560]]
    [["/rails/activesupport/lib/active_support/notifications/fanout.rb", 55, :T_DATA], [28528, 0, 27864, 0, 2, 3098592]]
    ```
Commits on Feb 5, 2015
  1. Fabien Jakimowicz
Commits on Feb 4, 2015
  1. yeonhoyoon

    fix typo

    yeonhoyoon authored
Commits on Feb 2, 2015
  1. Santiago Pastorino

    Merge pull request #791 from tagliala/add-woff2-mime-type

    spastorino authored
    Add woff2 mime type
  2. Santiago Pastorino

    Remove whitespaces

    spastorino authored
  3. Santiago Pastorino

    Merge pull request #788 from arcz/patch-1

    spastorino authored
    Update head.rb Fix indentation and move comment
  4. Santiago Pastorino

    Merge pull request #742 from schneems/schneems/freeze-string

    spastorino authored
    Missed optimizations
Commits on Jan 28, 2015
  1. Geremia Taglialatela

    Add woff2 mime type

    tagliala authored
Commits on Jan 23, 2015
  1. Artur Cygan

    Update head.rb

    arcz authored
    Fix indentation and move comment
Commits on Jan 6, 2015
  1. Peter Wilmott

    Update to reflect changes in #514

    p8952 authored
Commits on Jan 3, 2015
  1. Daniel Doubrovkine (dB.) @dblockdotorg
Commits on Dec 23, 2014
  1. James Tucker

    Fix lint header regex

    raggi authored
  2. James Tucker

    Merge pull request #762 from amarshall/monotonic-runtime

    raggi authored
    Use a monotonic time for Rack::Runtime, if available
  3. Santiago Pastorino
Something went wrong with that request. Please try again.