mirror of
https://github.com/ruby/ruby.git
synced 2026-01-27 04:24:23 +00:00
[rubygems/rubygems] Stop trying to remove every file on extraction
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
This commit is contained in:
parent
5a07417c6f
commit
e4fc0d4b3f
@ -436,8 +436,6 @@ EOM
|
||||
symlinks << [full_name, link_target, destination, real_destination]
|
||||
end
|
||||
|
||||
FileUtils.rm_rf destination
|
||||
|
||||
mkdir =
|
||||
if entry.directory?
|
||||
destination
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user