mitchellh/vagrant — pull request #4090 by sneal (2014-06-24 02:23:29+00:00)
Title: Improved box checksum verification performance

When adding large boxes verifying the checksum took noticably longer than expected because the Ruby GC was needlessly working overtime. With this PR the amount of total RAM consumed by the Ruby process was halved. MD5 checksum validation of a 10GB box was cut from 42 seconds to 18 seconds.

GC stats - existing code
-------------------------------
{:count=>2616, :heap_used=>447, :heap_length=>802, :heap_increment=>355, :heap_live_num=>92545, :heap_free_num=>89447, :heap_final_num=>0, :total_allocated_object=>2071688, :total_freed_object=>1979143}

GC stats - new code
-------------------------------
{:count=>31, :heap_used=>447, :heap_length=>802, :heap_increment=>355, :heap_live_num=>92395, :heap_free_num=>89443, :heap_final_num=>1, :total_allocated_object=>810035, :total_freed_object=>717640}