diff options
author | Janko Marohnić <janko.marohnic@gmail.com> | 2018-04-23 21:29:55 +0200 |
---|---|---|
committer | Janko Marohnić <janko.marohnic@gmail.com> | 2018-04-23 21:29:55 +0200 |
commit | 19770d6ca3ab72f760da47b5be484f36ae003f01 (patch) | |
tree | d4c4223ba7b6ad489021c9e67f6d1e532ad0fda6 /activerecord/lib/active_record/migration/command_recorder.rb | |
parent | 80cbf19453bb3fe22e8d038a9631b8436320788b (diff) | |
download | rails-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 'activerecord/lib/active_record/migration/command_recorder.rb')
0 files changed, 0 insertions, 0 deletions