unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: <gennady.uraltsev@gmail.com>
To: "'Eli Zaretskii'" <eliz@gnu.org>
Cc: 40384@debbugs.gnu.org
Subject: bug#40384: 26.3; [Windows10] variable-pitch-mode is slow to redraw
Date: Thu, 2 Apr 2020 18:29:07 -0400	[thread overview]
Message-ID: <000201d6093e$201fb6e0$605f24a0$@gmail.com> (raw)
In-Reply-To: <83pncqx85k.fsf@gnu.org>

By default the font that gets used is

          display: by this font (glyph code)
 
uniscribe:-outline-Arial-normal-normal-normal-sans-20-*-*-*-p-*-iso8859-1
(#x03)

as given by describe-char. On the other hand I can, before enabling the
mode, execute

  (custom-set-faces
 '(variable-pitch ((t (:height 120 :family "Segoe UI" :foundry "MS  " :slant
normal :weight normal :width normal)))))

and this gives

display: by this font (glyph code)
uniscribe:-outline-Segoe UI-normal-normal-normal-sans-24-*-*-*-p-*-iso8859-1
(#x37)

But slowness happens in both cases.


Here are the profiler reports for CPU for scrolling about 2 pages worth of
text by pushing the down arrow:
******Normal*******
- command-execute                                                   3  75%
 - call-interactively                                               3  75%
  - byte-code                                                       3  75%
   - read-extended-command                                          3  75%
    - completing-read                                               3  75%
     - completing-read-default                                      3  75%
        read-from-minibuffer                                        2  50%
- ...                                                               1  25%
   Automatic GC                                                     1  25%

******variable-pitch-mode*******
- command-execute                                                  92  97%
 - call-interactively                                              92  97%
  - funcall-interactively                                          91  96%
   - next-line                                                     89  94%
    - line-move                                                    89  94%
     - line-move-partial                                           59  62%
      - default-line-height                                        36  38%
         default-font-height                                       36  38%
      - window-screen-lines                                        23  24%
       - default-line-height                                       23  24%
          default-font-height                                      23  24%
     - default-line-height                                         30  31%
        default-font-height                                        30  31%
   - execute-extended-command                                       2   2%
    - sit-for                                                       2   2%
       redisplay                                                    2   2%
  - byte-code                                                       1   1%
   - read-extended-command                                          1   1%
    - completing-read                                               1   1%
     - completing-read-default                                      1   1%
      - read-from-minibuffer                                        1   1%
       - redisplay_internal (C function)                            1   1%
        - tool-bar-make-keymap                                      1   1%
         - tool-bar-make-keymap-1                                   1   1%
          - mapcar                                                  1   1%
           - #<compiled 0x1000d70c9>                                1   1%
            - eval                                                  1   1%
             - find-image                                           1   1%
                image-search-load-path                              1   1%
- ...                                                               2   2%
   Automatic GC                                                     2   2%

Thanks! 




-----Original Message-----
From: Eli Zaretskii <eliz@gnu.org> 
Sent: Thursday, 2 April, 2020 10:41
To: gennady.uraltsev@gmail.com
Cc: 40384@debbugs.gnu.org
Subject: Re: bug#40384: 26.3; [Windows10] variable-pitch-mode is slow to
redraw

> From: <gennady.uraltsev@gmail.com>
> Date: Wed, 1 Apr 2020 20:06:38 -0400
> 
> I am trying to emacs under Windows 10. variable-pitch-mode is insanely 
> slow in redrawing the screen. With a clean emacs.d I opened a text 
> file and tried pressing the down arrow. The cursor gets redisplayed 
> every 10 lines or so and emacs is very sluggish. It is interesting 
> that this DOES NOT happen with a normal, fixed-pitch, font and also 
> does NOT happen if I set the default font to be a variable pitch one 
> e.g. "Segoe UI". It only happens with variable-pitch-mode.

I don't think I can reproduce this.

Which font is used on your system when you turn on variable-pitch-mode?
(You can type "C-u C-x =" on a character to see the font used to display
it.)

> Attached are profiler results for moving down two pages worth of text.

Thanks, but you provided a "memory" profile, which is almost useless.
Please provide the "cpu" profile instead, and please show it in
human-readable form (after performing the measurement, type "M-x
profiler-report RET", then go to each top-level "+" sign and type "C-u RET"
to expand the profile; and finally paste the result into your message and
send it).






  reply	other threads:[~2020-04-02 22:29 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-02  0:06 bug#40384: 26.3; [Windows10] variable-pitch-mode is slow to redraw gennady.uraltsev
2020-04-02 14:40 ` Eli Zaretskii
2020-04-02 22:29   ` gennady.uraltsev [this message]
2020-04-03  7:04     ` Eli Zaretskii
2020-04-08 15:30       ` Gennady Uraltsev
2020-04-08 15:38         ` Eli Zaretskii
2021-12-05  1:16         ` Lars Ingebrigtsen
2022-01-21 13:38           ` Lars Ingebrigtsen

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='000201d6093e$201fb6e0$605f24a0$@gmail.com' \
    --to=gennady.uraltsev@gmail.com \
    --cc=40384@debbugs.gnu.org \
    --cc=eliz@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).