mirror of
https://github.com/ruby/ruby.git
synced 2026-01-27 04:24:23 +00:00
When we're extracting a gem, it should be extracted to an empty
directory. Trying to remove every file before extracting the file
greatly slows the tar extraction process.
This change increases tar extraction speed by about 10%:
Master branch:
```
aaron@tc ~/g/tartest (main)> ruby -I../rubygems/lib:../vernier/lib test.rb
{MEAN: 0.https://github.com/rubygems/rubygems/commit/670195550005}
{stddev: 0.https://github.com/rubygems/rubygems/commit/029875687861}
{"mib/s": 20.https://github.com/rubygems/rubygems/commit/889425481677}
```
This commit:
```
aaron@tc ~/g/tartest (main)> ruby -I../rubygems/lib:../vernier/lib test.rb
{MEAN: 0.https://github.com/rubygems/rubygems/commit/600223749969}
{stddev: 0.https://github.com/rubygems/rubygems/commit/037224226667}
{"mib/s": 23.https://github.com/rubygems/rubygems/commit/324635189326}
```
https://github.com/rubygems/rubygems/commit/e40a153560