Commit fce80abf authored by Shinya Maeda's avatar Shinya Maeda

Optimize http io with << method

parent 816cd996
...@@ -78,7 +78,7 @@ module Gitlab ...@@ -78,7 +78,7 @@ module Gitlab
data = get_chunk data = get_chunk
break if data.empty? break if data.empty?
out += data out << data
@tell += data.bytesize @tell += data.bytesize
end end
...@@ -95,11 +95,11 @@ module Gitlab ...@@ -95,11 +95,11 @@ module Gitlab
new_line = data.index("\n") new_line = data.index("\n")
if !new_line.nil? if !new_line.nil?
out += data[0..new_line] out << data[0..new_line]
@tell += new_line + 1 @tell += new_line + 1
break break
else else
out += data out << data
@tell += data.bytesize @tell += data.bytesize
end end
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment