Skip to content

Commit

Permalink
Use memoized Frame compilation instead of regenerating
Browse files Browse the repository at this point in the history
  • Loading branch information
acook committed Oct 8, 2023
1 parent 96b761d commit ce49f6c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/remedy/screen.rb
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,8 @@ def refresh_buffer
def populate_buffer
frames.sort_by(&:depth).each do |frame|
frame.available_size = buffer.size
fsize = frame.compiled_size
content = frame.compile_contents
fsize = frame.computed_size

case frame.vorigin
when :top
Expand All @@ -112,7 +113,7 @@ def populate_buffer
voffset += frame.offset.height
hoffset += frame.offset.width

buffer[voffset,hoffset] = frame
buffer[voffset,hoffset] = content
end
end
end
Expand Down

0 comments on commit ce49f6c

Please sign in to comment.