unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Herman, Géza" <geza.herman@gmail.com>
To: emacs-devel@gnu.org
Subject: Rendering performace vs. line-spacing
Date: Fri, 8 Jan 2021 12:34:53 +0100	[thread overview]
Message-ID: <5f7dd7c3-ec7d-ffd5-76af-1a5ee5177d07@gmail.com> (raw)

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



             reply	other threads:[~2021-01-08 11:34 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-08 11:34 Herman, Géza [this message]
2021-01-08 12:22 ` Rendering performace vs. line-spacing Eli Zaretskii
2021-01-08 13:46   ` Herman, Geza
2021-01-08 14:35     ` Eli Zaretskii
2021-01-08 15:38       ` Herman, Geza
2021-01-08 15:46         ` Eli Zaretskii
2021-01-08 16:04           ` Herman, Geza

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5f7dd7c3-ec7d-ffd5-76af-1a5ee5177d07@gmail.com \
    --to=geza.herman@gmail.com \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).