Skip to content

Commit

Permalink
Remove additional Array instantiation for each line being cleared;
Browse files Browse the repository at this point in the history
Work relating to #364.
  • Loading branch information
gavinlaking committed May 21, 2016
1 parent 612eb37 commit 397b648
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions lib/vedeu/interfaces/clear_content.rb
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,9 @@ def interface
def optimised_output
Vedeu.timer("Optimised clearing content: '#{name}'") do
Array.new(bordered_height) do |iy|
[
Vedeu::Geometries::Position.new(by + iy, bx),
colour.to_s,
chars,
].join
Vedeu::Geometries::Position.new(by + iy, bx).to_s +
colour.to_s +
chars
end.join + Vedeu::Geometries::Position.new(by, bx)
end
end
Expand Down

0 comments on commit 397b648

Please sign in to comment.