diff options
author | Christian Duerr <contact@christianduerr.com> | 2021-05-22 22:48:43 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-22 22:48:43 +0000 |
commit | 3c61e075fef7b02ae0d043e4a4e664b8bc7221e9 (patch) | |
tree | f1aa2b0bc18ddea72ef8b989d41fa9d915f6d300 /CHANGELOG.md | |
parent | c17d8db16934fa2dbd667acea697cd0682826c80 (diff) | |
download | alacritty-3c61e075fef7b02ae0d043e4a4e664b8bc7221e9.tar.gz alacritty-3c61e075fef7b02ae0d043e4a4e664b8bc7221e9.zip |
Improve rendering performance
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.
Diffstat (limited to 'CHANGELOG.md')
-rw-r--r-- | CHANGELOG.md | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index 45f58d57..14984fd5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - Support for `ipfs`/`ipns` URLs +### Fixed + +- Regression in rendering performance with dense grids since 0.6.0 + ## 0.8.0 ### Packaging |