diff options
| author | Colin Percival <cperciva@FreeBSD.org> | 2018-08-25 16:14:56 +0000 |
|---|---|---|
| committer | Colin Percival <cperciva@FreeBSD.org> | 2018-08-25 16:14:56 +0000 |
| commit | ee97b2336aa47851a1dc5681ea2017cc2193aac4 (patch) | |
| tree | b71313b22544758bd031086c18aff3b055fa793e /sys/dev/rt | |
| parent | fedded8d048045db541bcff2287ab894cb290bd4 (diff) | |
Speed up vt(4) by keeping a record of the most recently drawn character and
the foreground and background colours. In bitblt_text functions, compare
values to this cache and don't re-draw the characters if they haven't changed.
When invalidating the display, clear this cache in order to force characters
to be redrawn; also force full redraws between suspend/resume pairs since odd
artifacts can otherwise result.
When scrolling the display (which is where most time is spent within the vt
driver) this yields a significant performance improvement if most lines are
less than the width of the terminal, since this avoids re-drawing blanks on
top of blanks.
(Note that "re-drawing" here includes writing to the VGA text mode buffer; on
virtualized systems this can be extremely slow since it triggers a glyph
being rendered onto a 640x480 screen).
On a c5.4xlarge EC2 instance (with emulated text mode VGA) this cuts the time
spent in vt(4) during the kernel boot from 1200 ms to 700ms; on my laptop
(with a 3200x1800 display) the corresponding time is reduced from 970 ms down
to 155 ms.
Reviewed by: imp, cem
Approved by: re (gjb)
Relnotes: Significant speedup in vt(4) and the system boot generally.
Differential Revision: https://reviews.freebsd.org/D16723
Notes
svn path=/head/; revision=338316
Diffstat (limited to 'sys/dev/rt')
0 files changed, 0 insertions, 0 deletions
