explicitly clear large buf when it is obviously safe
commit07ad40459314ae815d218f7c5d67d26f9c328cd8
authorEric Wong <e@80x24.org>
Sat, 5 Nov 2016 02:07:37 +0000 (5 02:07 +0000)
committerEric Wong <e@80x24.org>
Sat, 5 Nov 2016 02:08:06 +0000 (5 02:08 +0000)
tree6283a48bf0585e43fec3db1ac21f8793910eb3f4
parent1f09e59c13608d6a8dd765604fa7c7b7dc396424
explicitly clear large buf when it is obviously safe

We can reduce memory pressure on the GC by explicitly
calling String#clear after we're done with a buffer.
This will hopefully reduce malloc fragmentation as
well as improving locality.
lib/http_spew/content_md5.rb
lib/http_spew/input_spray.rb
lib/http_spew/request.rb