aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/testing/autorun.rb
diff options
context:
space:
mode:
authorJanko Marohnić <janko.marohnic@gmail.com>2018-04-23 21:29:55 +0200
committerJanko Marohnić <janko.marohnic@gmail.com>2018-04-23 21:29:55 +0200
commit19770d6ca3ab72f760da47b5be484f36ae003f01 (patch)
treed4c4223ba7b6ad489021c9e67f6d1e532ad0fda6 /activesupport/lib/active_support/testing/autorun.rb
parent80cbf19453bb3fe22e8d038a9631b8436320788b (diff)
downloadrails-19770d6ca3ab72f760da47b5be484f36ae003f01.tar.gz
rails-19770d6ca3ab72f760da47b5be484f36ae003f01.tar.bz2
rails-19770d6ca3ab72f760da47b5be484f36ae003f01.zip
Halve memory allocation in S3Service#download
Aws::S3::Object#get returns a response with object content wrapped in an in-memory StringIO object. StringIO#read will return a copy of the content, which is not necessary because we can return the content directly using StringIO#string. This halves memory allocation of S3Service#download, because we remove unnecessary content duplication.
Diffstat (limited to 'activesupport/lib/active_support/testing/autorun.rb')
0 files changed, 0 insertions, 0 deletions