aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorJack Nagel2015-01-05 10:45:05 -0500
committerJack Nagel2015-01-05 10:45:05 -0500
commit120bd43f877f31332b5e42e7bdef77f2bfe0a1e2 (patch)
treeed071f8787a879c433836880dc9c009c99d36193 /Library
parent3821c190f90f61fdbb17c2785d61e0cd67a97d7e (diff)
downloadbrew-120bd43f877f31332b5e42e7bdef77f2bfe0a1e2.tar.bz2
Buffer 16K at a time
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/download_strategy.rb2
-rw-r--r--Library/Homebrew/extend/pathname.rb2
2 files changed, 2 insertions, 2 deletions
diff --git a/Library/Homebrew/download_strategy.rb b/Library/Homebrew/download_strategy.rb
index 094e8265f..e3db1e914 100644
--- a/Library/Homebrew/download_strategy.rb
+++ b/Library/Homebrew/download_strategy.rb
@@ -209,7 +209,7 @@ class AbstractFileDownloadStrategy < AbstractDownloadStrategy
Utils.popen_read(tool, "-f", cached_location.to_s, "-c") do |pipe|
File.open(target, "wb") do |f|
buf = ""
- f.write(buf) while pipe.read(1024, buf)
+ f.write(buf) while pipe.read(16384, buf)
end
end
end
diff --git a/Library/Homebrew/extend/pathname.rb b/Library/Homebrew/extend/pathname.rb
index 6e704a372..71f2d6b0b 100644
--- a/Library/Homebrew/extend/pathname.rb
+++ b/Library/Homebrew/extend/pathname.rb
@@ -262,7 +262,7 @@ class Pathname
digest.file(self)
else
buf = ""
- open("rb") { |f| digest << buf while f.read(1024, buf) }
+ open("rb") { |f| digest << buf while f.read(16384, buf) }
end
digest.hexdigest
end