|
From: | Herman , Géza |
Subject: | Rendering performace vs. line-spacing |
Date: | Fri, 8 Jan 2021 12:34:53 +0100 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.1 |
Hi all,I noticed that emacs's performance can depend on the font. For example, Consolas has a much worse performance (scrolling is sluggish) than BitStream Mono. I profiled emacs, and the main difference is "draw_glyphs". When emacs is slow (using consolas), this function takes 50-60% of CPU time (measured by "perf record -g"). When emacs is fast (using BitStream), this function takes only ~2-3%.
I played with my font's ascent and descent settings to have more line on the screen (as emacs doesn't support negative line-spacing). Originally, "draw_glyphs" takes 2-3% with my font. But if I decrease the height of the font by modifying ascent/descent, then the same thing happens: draw_glyphs takes 50-60% CPU time. If I set line-spacing to 2, draw_glyphs become normal, 2-3% CPU time.
(I'm using a master build from yesterday)Any ideas why this happens? Maybe this happens because lines may overlap and some caching mechanism gets disabled?
Thanks, Geza
[Prev in Thread] | Current Thread | [Next in Thread] |