mirror of
https://github.com/alacritty/alacritty.git
synced 2024-11-25 14:05:41 -05:00
3cdba29124
The InstanceData type in the rendering subsystem was previously 16 floats which occupied a total of 64 bytes per instance. This meant that for every character or background cell drawn, 64 bytes were sent to the GPU. In the case of a 400x100 cell grid, a total of 2.5MB would be sent. This patch reduces InstanceData's size to 26 bytes, a 60% improvement! Using the above example for comparison, a worst case of 1MB would be transferred. The motivation for this patch comes from macOS. Once the terminal grid would reach a certain size, performance experienced a sharp and dramatic drop (render times would go from ~3ms to ~16ms). I don't want to speculate too much on the underlying issue, but suffice it to say that this patch alleviates the problem in my testing. |
||
---|---|---|
.. | ||
renderer | ||
term | ||
ansi.rs | ||
cli.rs | ||
config.rs | ||
display.rs | ||
event.rs | ||
event_loop.rs | ||
grid.rs | ||
index.rs | ||
input.rs | ||
lib.rs | ||
logging.rs | ||
macros.rs | ||
main.rs | ||
meter.rs | ||
selection.rs | ||
sync.rs | ||
tty.rs | ||
util.rs | ||
window.rs |