[ruby-cvs:69262] normal:r62081 (trunk): uri/common: reduce allocations and retained objects

normal at ruby-lang.org normal at ruby-lang.org
Mon Jan 29 06:07:13 JST 2018


normal	2018-01-29 06:07:13 +0900 (Mon, 29 Jan 2018)

  New Revision: 62081

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=62081

  Log:
    uri/common: reduce allocations and retained objects
    
    Thanks to Sam Saffron for this patch, it shows
    a nice reduction which affects many web applications:
    
      require 'memory_profiler'
    
      MemoryProfiler.report do
        require 'uri'
      end.pretty_print
    
    Before:
    
    Total allocated: 986643 bytes (15159 objects)
    Total retained:  246370 bytes (2532 objects)
    
    After:
    
    Total allocated: 926903 bytes (13665 objects)
    Total retained:  208570 bytes (1587 objects)
    
    * lib/uri/common.rb: reduce allocations and retained objects
      [ruby-core:85161] [Feature #14410]

  Modified files:
    trunk/lib/uri/common.rb


More information about the ruby-cvs mailing list