mirror of
https://github.com/wez/wezterm.git
synced 2024-11-10 15:04:32 +03:00
72674f5d28
The clustered line storage impl of get_cell() is O(column-index) as cells have to be iterated in order. The render pass was calling it 3 times to resolve information about the cursor; reduce that to just once. It was also calling it once per cell to determine whether the cell needed to be replaced with a custom glyph if custom block glyphs were enabled, making it accidentally quadratic! While it wasn't especially expensive, it did show up in profiling, so this commit removes that call: we can cache the block glyph key in the shaper info which is a better place for it anyway, so that's what we do. Similarly, there was some extraneous work to call get_cell when computing some shaper info; remove that too! That one might be slightly contentious: the is-followed-by-space logic used to check the successor cell by index to see if it was a space, but now looks at the successor shaped glyph to see if it was a space. That might actually be a better choice, but it may have some ripple effects. |
||
---|---|---|
.. | ||
src | ||
Cargo.toml |