Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[rubygems/rubygems] Use
Array#concat
in SpecSet#for
to save memory
On `rails/rails` repository Gemfile, running the following script ``` # script.rb require "bundler/setup" ``` #### Before ``` ➜ rails git:(main) ✗ BUNDLER_VERSION=2.4.0.dev ruby-memory-profiler --pretty --no-detailed --allocated-strings=0 --retained-strings=0 script.rb Total allocated: 24.37 MB (207937 objects) Total retained: 2.98 MB (34152 objects) ``` #### After ``` ➜ rails git:(main) ✗ BUNDLER_VERSION=2.4.0.dev ruby-memory-profiler --pretty --no-detailed --allocated-strings=0 --retained-strings=0 script.rb Total allocated: 22.27 MB (206856 objects) Total retained: 2.98 MB (34152 objects) ``` rubygems/rubygems@2ea2523afd Co-authored-by: Josh Nichols <josh.nichols@gusto.com>
- Loading branch information