<feed xmlns='http://www.w3.org/2005/Atom'>
<title>r-alacritty.git/alacritty_terminal/src/grid, branch experimental</title>
<subtitle>My custom-patched version of alacritty.
</subtitle>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/r-alacritty.git/'/>
<entry>
<title>Improve rendering performance</title>
<updated>2021-05-22T22:48:43+00:00</updated>
<author>
<name>Christian Duerr</name>
<email>contact@christianduerr.com</email>
</author>
<published>2021-05-22T22:48:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/r-alacritty.git/commit/?id=3c61e075fef7b02ae0d043e4a4e664b8bc7221e9'/>
<id>3c61e075fef7b02ae0d043e4a4e664b8bc7221e9</id>
<content type='text'>
This PR combines a couple of optimizations to drastically reduce the
time it takes to gather everything necessary for rendering Alacritty's
terminal grid.

To help with the iteration over the grid, the `DisplayIter` which made
heavy use of dynamic dispatch has been replaced with a simple addition
to the `GridIterator` which also had the benefit of making the code a
little easier to understand.

The hints/search check for each cell was always performing an array
lookup before figuring out that the cell is not part of a hint or
search. Since the general case is that the cell is neither part of hints
or search, they've been wrapped in an `Option` to make verifying their
activity a simple `is_some()` check.

For some reason the compiler was also struggling with the `cursor`
method of the `RenderableContent`. Since the iterator is explicitly
drained, the performance took a hit of multiple milliseconds for a
single branch. Our implementation does never reach the case where
draining the iterator would be necessary, so this sanity check has just
been replaced with a `debug_assert`.

Overall this has managed to reduce the time it takes to collect all
renderable content from ~7-8ms in my large grid test to just ~3-4ms.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This PR combines a couple of optimizations to drastically reduce the
time it takes to gather everything necessary for rendering Alacritty's
terminal grid.

To help with the iteration over the grid, the `DisplayIter` which made
heavy use of dynamic dispatch has been replaced with a simple addition
to the `GridIterator` which also had the benefit of making the code a
little easier to understand.

The hints/search check for each cell was always performing an array
lookup before figuring out that the cell is not part of a hint or
search. Since the general case is that the cell is neither part of hints
or search, they've been wrapped in an `Option` to make verifying their
activity a simple `is_some()` check.

For some reason the compiler was also struggling with the `cursor`
method of the `RenderableContent`. Since the iterator is explicitly
drained, the performance took a hit of multiple milliseconds for a
single branch. Our implementation does never reach the case where
draining the iterator would be necessary, so this sanity check has just
been replaced with a `debug_assert`.

Overall this has managed to reduce the time it takes to collect all
renderable content from ~7-8ms in my large grid test to just ~3-4ms.</pre>
</div>
</content>
</entry>
<entry>
<title>Fix release mode tests</title>
<updated>2021-05-01T16:57:52+00:00</updated>
<author>
<name>Christian Duerr</name>
<email>contact@christianduerr.com</email>
</author>
<published>2021-05-01T16:57:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/r-alacritty.git/commit/?id=e64e0f0df92c9c11ab2399b4bb977b888551e153'/>
<id>e64e0f0df92c9c11ab2399b4bb977b888551e153</id>
<content type='text'>
Fixes #5041.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fixes #5041.</pre>
</div>
</content>
</entry>
<entry>
<title>Fix automatic scrolling on resize</title>
<updated>2021-04-08T20:29:47+00:00</updated>
<author>
<name>Richard Steinmetz</name>
<email>richard@steinmetz.cloud</email>
</author>
<published>2021-04-08T20:29:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/r-alacritty.git/commit/?id=78953e4f7e89d0e90b8e1981bf76b03df16eded3'/>
<id>78953e4f7e89d0e90b8e1981bf76b03df16eded3</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Keep viewport in place during resize</title>
<updated>2021-03-31T19:11:16+00:00</updated>
<author>
<name>Richard Steinmetz</name>
<email>richard@steinmetz.cloud</email>
</author>
<published>2021-03-31T19:11:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/r-alacritty.git/commit/?id=58cae8f2edf44e6bf0721543c61edb57bdf7d776'/>
<id>58cae8f2edf44e6bf0721543c61edb57bdf7d776</id>
<content type='text'>
Fixes #4879.

Co-authored-by: Christian Duerr &lt;contact@christianduerr.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fixes #4879.

Co-authored-by: Christian Duerr &lt;contact@christianduerr.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>Unify the grid line indexing types</title>
<updated>2021-03-30T23:25:38+00:00</updated>
<author>
<name>Christian Duerr</name>
<email>contact@christianduerr.com</email>
</author>
<published>2021-03-30T23:25:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/r-alacritty.git/commit/?id=3bd5ac221ab3b122962063edd1f4c10f9f2d117f'/>
<id>3bd5ac221ab3b122962063edd1f4c10f9f2d117f</id>
<content type='text'>
Previously Alacritty was using two different ways to reference lines in
the terminal. Either a `usize`, or a `Line(usize)`. These indexing
systems both served different purposes, but made it difficult to reason
about logic involving these systems because of its inconsistency.

To resolve this issue, a single new `Line(i32)` type has been
introduced.  All existing references to lines and points now rely on
this definition of a line.

The indexing starts at the top of the terminal region with the line 0,
which matches the line 1 used by escape sequences. Each line in the
history becomes increasingly negative and the bottommost line is equal
to the number of visible lines minus one.

Having a system which goes into the negatives allows following the
escape sequence's indexing system closely, while at the same time making
it trivial to implement `Ord` for points.

The Alacritty UI crate is the only place which has a different indexing
system, since rendering and input puts the zero line at the top of the
viewport, rather than the top of the terminal region.

All instances which refer to a number of lines/columns instead of just a
single Line/Column have also been changed to use a `usize` instead. This
way a Line/Column will always refer to a specific place in the grid and
no confusion is created by having a count of lines as a possible index
into the grid storage.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Previously Alacritty was using two different ways to reference lines in
the terminal. Either a `usize`, or a `Line(usize)`. These indexing
systems both served different purposes, but made it difficult to reason
about logic involving these systems because of its inconsistency.

To resolve this issue, a single new `Line(i32)` type has been
introduced.  All existing references to lines and points now rely on
this definition of a line.

The indexing starts at the top of the terminal region with the line 0,
which matches the line 1 used by escape sequences. Each line in the
history becomes increasingly negative and the bottommost line is equal
to the number of visible lines minus one.

Having a system which goes into the negatives allows following the
escape sequence's indexing system closely, while at the same time making
it trivial to implement `Ord` for points.

The Alacritty UI crate is the only place which has a different indexing
system, since rendering and input puts the zero line at the top of the
viewport, rather than the top of the terminal region.

All instances which refer to a number of lines/columns instead of just a
single Line/Column have also been changed to use a `usize` instead. This
way a Line/Column will always refer to a specific place in the grid and
no confusion is created by having a count of lines as a possible index
into the grid storage.
</pre>
</div>
</content>
</entry>
<entry>
<title>Move renderable cell transformation to alacritty</title>
<updated>2021-01-24T21:45:36+00:00</updated>
<author>
<name>Christian Duerr</name>
<email>contact@christianduerr.com</email>
</author>
<published>2021-01-24T21:45:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/r-alacritty.git/commit/?id=530de00049c2afcc562d36ccdb3e6afa2fe396a5'/>
<id>530de00049c2afcc562d36ccdb3e6afa2fe396a5</id>
<content type='text'>
This refactors a large chunk of the alacritty_terminal API to expose all
data necessary for rendering uniformly through the `renderable_content`
call. This also no longer transforms the cells for rendering by a GUI
but instead just reports the content from a terminal emulation
perspective. The transformation into renderable cells is now done inside
the alacritty crate.

Since the terminal itself only ever needs to know about modified color
RGB values, the configuration for colors was moved to the alacritty UI
code.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This refactors a large chunk of the alacritty_terminal API to expose all
data necessary for rendering uniformly through the `renderable_content`
call. This also no longer transforms the cells for rendering by a GUI
but instead just reports the content from a terminal emulation
perspective. The transformation into renderable cells is now done inside
the alacritty crate.

Since the terminal itself only ever needs to know about modified color
RGB values, the configuration for colors was moved to the alacritty UI
code.</pre>
</div>
</content>
</entry>
<entry>
<title>Fix assertion crash on 32-bit systems</title>
<updated>2021-01-11T12:42:06+00:00</updated>
<author>
<name>r-c-f</name>
<email>ryan.farley@gmx.com</email>
</author>
<published>2021-01-11T12:42:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/r-alacritty.git/commit/?id=aefffde539c0649e3ebe3a81b2e15a25e760d29c'/>
<id>aefffde539c0649e3ebe3a81b2e15a25e760d29c</id>
<content type='text'>
Fixes #4687.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fixes #4687.</pre>
</div>
</content>
</entry>
<entry>
<title>Remove Windows WinPTY backend</title>
<updated>2021-01-01T05:07:39+00:00</updated>
<author>
<name>Christian Duerr</name>
<email>contact@christianduerr.com</email>
</author>
<published>2021-01-01T05:07:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/r-alacritty.git/commit/?id=8ed72cc065255007a7f0687e3b8a540e8c6202c6'/>
<id>8ed72cc065255007a7f0687e3b8a540e8c6202c6</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Use ConfigDeserialize for all config enums</title>
<updated>2020-12-31T05:52:45+00:00</updated>
<author>
<name>Christian Duerr</name>
<email>contact@christianduerr.com</email>
</author>
<published>2020-12-31T05:52:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/r-alacritty.git/commit/?id=1723e30d25f0c6068f9532448b016a89aa491a95'/>
<id>1723e30d25f0c6068f9532448b016a89aa491a95</id>
<content type='text'>
This fixes up all of the remaining enums which are used in the
configuration file to make sure they all support fully case insensitive
deserialization.

Fixes #4611.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This fixes up all of the remaining enums which are used in the
configuration file to make sure they all support fully case insensitive
deserialization.

Fixes #4611.</pre>
</div>
</content>
</entry>
<entry>
<title>Fix scrolling region performance with fixed lines</title>
<updated>2020-12-10T02:10:24+00:00</updated>
<author>
<name>Christian Duerr</name>
<email>contact@christianduerr.com</email>
</author>
<published>2020-12-10T02:10:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/r-alacritty.git/commit/?id=4975be29df848db9b339b5390290e4eb2ac8e140'/>
<id>4975be29df848db9b339b5390290e4eb2ac8e140</id>
<content type='text'>
This resolves an issue with Alacritty's scrolling region performance
when there's a number of fixed lines at the top of the screen. This
affects commonly used applications like tmux or vim.

Instead of using separate logic for when the scrolling region starts at
the top of the screen without any fixed lines, the code should now try
to figure out the target position of these fixed lines ahead of time,
swap them into place and still perform the optimized implementation to
move the grid.

This comes with the small trade-off that since lines are swapped before
rotating the screen without clearing or removing any lines during the
rotation process, that the places the fixed lines have been swapped with
will appear out of order when using scrolling regions in the primary
screen buffer. Since the use of scrolling regions primarily affects the
alternate screen and most terminals don't keep any history at all, this
should however not cause any problems.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This resolves an issue with Alacritty's scrolling region performance
when there's a number of fixed lines at the top of the screen. This
affects commonly used applications like tmux or vim.

Instead of using separate logic for when the scrolling region starts at
the top of the screen without any fixed lines, the code should now try
to figure out the target position of these fixed lines ahead of time,
swap them into place and still perform the optimized implementation to
move the grid.

This comes with the small trade-off that since lines are swapped before
rotating the screen without clearing or removing any lines during the
rotation process, that the places the fixed lines have been swapped with
will appear out of order when using scrolling regions in the primary
screen buffer. Since the use of scrolling regions primarily affects the
alternate screen and most terminals don't keep any history at all, this
should however not cause any problems.
</pre>
</div>
</content>
</entry>
</feed>
