bug#25148: 25.1; Slow scrolling with emacs 25.1 and Windows 10.

classic Classic list List threaded Threaded
14 messages Options
Reply | Threaded
Open this post in threaded view
|

bug#25148: 25.1; Slow scrolling with emacs 25.1 and Windows 10.

Kristiyan Kanchev
Hello,

When I decided to upgrade to the new version of Emacs - 25.1 I started
getting very slow text scrolling. With all my packages loaded and in
Python mode emacs is completelty unusable because there is a about half
a second delay after every down arrow press.

Moreover, I then tried emacs -Q and opened my init.el. Pressed on the
down arrow key and holding it caused sluggish scrolling when the cursor
reaches somewhere around the half of the init.el.

I have also run the profiler while in emacs -Q and init.el:

- command-execute                                                2337  96%
 - call-interactively                                            2337  96%
  - funcall-interactively                                        2311  95%
   - next-line                                                   1991  82%
    - line-move                                                  1991  82%
     - line-move-partial                                         1356  56%
      - window-screen-lines                                         2   0%
       - default-line-height                                        2   0%
          default-font-height                                       1   0%
       line-move-visual                                           423  17%
   - previous-line                                                320  13%
    - line-move                                                   320  13%
       line-move-visual                                           161   6%
  - byte-code                                                      26   1%
   - read-extended-command                                         26   1%
    - completing-read                                              26   1%
     - completing-read-default                                     26   1%
        read-from-minibuffer                                       26   1%
+ ...

For now I reverted using emacs 24.5 and with it I don't have such
problems.
It's quite strange because at home I'm using Ubuntu and emacs 25.1
doesn't have problems with scrolling. It's only happening on my computer
at work running Windows 10.

Just in case, I'm writing this mail from emacs -Q so you can see my
context:

In GNU Emacs 25.1.1 (i686-w64-mingw32)
 of 2016-11-16 built on LAPHROAIG
Windowing system distributor 'Microsoft Corp.', version 10.0.14393
Configured using:
 'configure --host=i686-w64-mingw32 --without-dbus
 --without-compress-install 'CFLAGS=-static -O2 -g3''

Configured features:
XPM JPEG TIFF GIF PNG RSVG SOUND NOTIFY ACL GNUTLS LIBXML2 ZLIB
TOOLKIT_SCROLL_BARS

Important settings:
  value of $LANG: BGR
  locale-coding-system: cp1251

Major mode: Emacs-Lisp

Minor modes in effect:
  diff-auto-refine-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug message dired format-spec rfc822 mml
mml-sec password-cache epg epg-config gnus-util mm-decode mm-bodies
mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail
rfc2047 rfc2045 ietf-drums mm-util help-fns help-mode cl-loaddefs pcase
cl-lib mail-prsvr mail-utils vc-git diff-mode easymenu easy-mmode
time-date mule-util tooltip eldoc electric uniquify ediff-hook vc-hooks
lisp-float-type mwheel dos-w32 ls-lisp disp-table w32-win w32-vars
term/common-win tool-bar dnd fontset image regexp-opt fringe
tabulated-list newcomment elisp-mode lisp-mode prog-mode register page
menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock
syntax facemenu font-core frame cl-generic cham georgian utf-8-lang
misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms
cp51932 hebrew greek romanian slovak czech european ethiopic indian
cyrillic chinese charscript case-table epa-hook jka-cmpr-hook help
simple abbrev minibuffer cl-preloaded nadvice loaddefs button faces
cus-face macroexp files text-properties overlay sha1 md5 base64 format
env code-pages mule custom widget hashtable-print-readable backquote
w32notify w32 multi-tty make-network-process emacs)

Memory information:
((conses 8 93915 10745)
 (symbols 32 20061 0)
 (miscs 32 95 181)
 (strings 16 17370 3420)
 (string-bytes 1 476444)
 (vectors 8 12905)
 (vector-slots 4 445216 3224)
 (floats 8 165 30)
 (intervals 28 433 42)
 (buffers 520 21))


--
//
Reply | Threaded
Open this post in threaded view
|

bug#25148: 25.1; Slow scrolling with emacs 25.1 and Windows 10.

Eli Zaretskii
> From: Kristiyan Kanchev <[hidden email]>
> Date: Fri, 9 Dec 2016 11:22:08 +0200
>
> When I decided to upgrade to the new version of Emacs - 25.1 I started
> getting very slow text scrolling. With all my packages loaded and in
> Python mode emacs is completelty unusable because there is a about half
> a second delay after every down arrow press.
>
> Moreover, I then tried emacs -Q and opened my init.el. Pressed on the
> down arrow key and holding it caused sluggish scrolling when the cursor
> reaches somewhere around the half of the init.el.
>
> I have also run the profiler while in emacs -Q and init.el:
>
> - command-execute 2337 96%
> - call-interactively 2337 96%
> - funcall-interactively 2311 95%
> - next-line 1991 82%
> - line-move 1991 82%
> - line-move-partial 1356 56%

Sounds like some issue with fonts.  Does it help to set
inhibit-compacting-font-caches to a non-nil value?



Reply | Threaded
Open this post in threaded view
|

bug#25148:

Kristiyan Kanchev
In reply to this post by Kristiyan Kanchev
Hello,

Setting inhibit-compacting-font-caches doesn't change anything.
However, the interesting thing is that C-h v command doesn't find
variable named inhibit-compacting-font-caches. After I set it with
(setq inhibit-compacting-font-caches t) C-h v is finding it but without
available documentation.




Reply | Threaded
Open this post in threaded view
|

bug#25148:

Eli Zaretskii
> From: [hidden email]
> Date: Mon, 12 Dec 2016 10:43:48 +0200
>
> Setting inhibit-compacting-font-caches doesn't change anything.
> However, the interesting thing is that C-h v command doesn't find
> variable named inhibit-compacting-font-caches. After I set it with
> (setq inhibit-compacting-font-caches t) C-h v is finding it but without
> available documentation.

Sorry, I somehow missed the fact that you were using the stock 25.1
version.  This variable was introduced after 25.1 was released, in
preparation for 25.2.  So you should be able to see its effect if you
build the latest pretest, 25.1.90, or the current emacs-25 branch of
the Emacs Git repository.

Thanks.



Reply | Threaded
Open this post in threaded view
|

bug#25148:

Kristiyan Kanchev
In reply to this post by Kristiyan Kanchev
Hello,

I've just built emacs 25.1.90 and after settings
inhibit-compacting-font-caches to t the problem went away!
Do you need more info for debugging why I need to set this variable,
while others don't observe this issue?

Kriss



Reply | Threaded
Open this post in threaded view
|

bug#25148:

Eli Zaretskii
> From: [hidden email]
> Date: Wed, 14 Dec 2016 16:39:57 +0200
>
> I've just built emacs 25.1.90 and after settings
> inhibit-compacting-font-caches to t the problem went away!

Great, thanks for testing.

> Do you need more info for debugging why I need to set this variable,
> while others don't observe this issue?

Yes, I'd like to know which font(s) causes this slow-down.  Can you
tell?  You can use "C-u C-x =" to show the font used to display the
character at cursor.

Thanks.



Reply | Threaded
Open this post in threaded view
|

bug#25148:

Kristiyan Kanchev
In reply to this post by Kristiyan Kanchev
This is the output of of C-u C-x =:

             position: 2673 of 4393 (61%), column: 15
            character: h (displayed as h) (codepoint 104, #o150, #x68)
    preferred charset: ascii (ASCII (ISO646 IRV))
code point in charset: 0x68
               script: latin
               syntax: w which means: word
             category: .:Base, L:Left-to-right (strong), a:ASCII, l:Latin, r:Roman
             to input: type "C-x 8 RET HEX-CODEPOINT" or "C-x 8 RET NAME"
          buffer code: #x68
            file code: #x68 (encoded by coding system utf-8-unix)
              display: by this font (glyph code)
    uniscribe:-outline-Courier New-normal-normal-normal-mono-13-*-*-*-c-*-iso8859-1 (#x4B)

Character code properties: customize what to show
  name: LATIN SMALL LETTER H
  general-category: Ll (Letter, Lowercase)
  decomposition: (104) ('h')

There are text properties here:
  fontified            t



Reply | Threaded
Open this post in threaded view
|

bug#25148:

Eli Zaretskii
> From: [hidden email]
> Date: Wed, 14 Dec 2016 18:29:26 +0200
>
> This is the output of of C-u C-x =:
>
>              position: 2673 of 4393 (61%), column: 15
>             character: h (displayed as h) (codepoint 104, #o150, #x68)
>     preferred charset: ascii (ASCII (ISO646 IRV))
> code point in charset: 0x68
>                script: latin
>                syntax: w which means: word
>              category: .:Base, L:Left-to-right (strong), a:ASCII, l:Latin, r:Roman
>              to input: type "C-x 8 RET HEX-CODEPOINT" or "C-x 8 RET NAME"
>           buffer code: #x68
>             file code: #x68 (encoded by coding system utf-8-unix)
>               display: by this font (glyph code)
>     uniscribe:-outline-Courier New-normal-normal-normal-mono-13-*-*-*-c-*-iso8859-1 (#x4B)

Are you saying that scrolling is slow even if the buffer contains only
ASCII characters, such as 'h'?  Are there no non-ASCII characters in
that buffer?  If there are non-ASCII characters, can you tell which
font(s) is/are used for them?



Reply | Threaded
Open this post in threaded view
|

bug#25148:

Kristiyan Kanchev
In reply to this post by Kristiyan Kanchev
Ahaaaa!
Yes, I have non-ASCII characters! The characters that are causing this
are:

             position: 2465 of 4273 (58%), column: 30
            character: ⓐ (displayed as ⓐ) (codepoint 9424, #o22320, #x24d0)
    preferred charset: unicode (Unicode (ISO10646))
code point in charset: 0x24D0
               script: symbol
               syntax: w which means: word
             category: .:Base, L:Left-to-right (strong), h:Korean, j:Japanese, l:Latin
             to input: type "C-x 8 RET 24d0" or "C-x 8 RET CIRCLED LATIN SMALL LETTER A"
          buffer code: #xE2 #x93 #x90
            file code: #xE2 #x93 #x90 (encoded by coding system utf-8-unix)
              display: by this font (glyph code)
    uniscribe:-outline-Malgun Gothic-normal-normal-normal-sans-13-*-*-*-p-*-ksc5601.1987-0 (#xDB)

Character code properties: customize what to show
  name: CIRCLED LATIN SMALL LETTER A
  general-category: So (Symbol, Other)
  decomposition: (circle 97) (circle 'a')

There are text properties here:
  face                 font-lock-string-face
  fontified            t

and:

             position: 2832 of 4394 (64%), column: 30
            character: ⓒ (displayed as ⓒ) (codepoint 9426, #o22322, #x24d2)
    preferred charset: unicode (Unicode (ISO10646))
code point in charset: 0x24D2
               script: symbol
               syntax: w which means: word
             category: .:Base, L:Left-to-right (strong), h:Korean, j:Japanese, l:Latin
             to input: type "C-x 8 RET 24d2" or "C-x 8 RET CIRCLED LATIN SMALL LETTER C"
          buffer code: #xE2 #x93 #x92
            file code: #xE2 #x93 #x92 (encoded by coding system utf-8-unix)
              display: by this font (glyph code)
    uniscribe:-outline-Malgun Gothic-normal-normal-normal-sans-13-*-*-*-p-*-ksc5601.1987-0 (#xDD)

Character code properties: customize what to show
  name: CIRCLED LATIN SMALL LETTER C
  general-category: So (Symbol, Other)
  decomposition: (circle 99) (circle 'c')

There are text properties here:
  face                 font-lock-string-face
  fontified            t


If I remove these symbols from the init file scrolling gets very
smooth. So I guess the Malgun Gothic is the culprit!



Reply | Threaded
Open this post in threaded view
|

bug#25148:

Eli Zaretskii
> From: [hidden email]
> Date: Wed, 14 Dec 2016 19:00:51 +0200
>
> Ahaaaa!
> Yes, I have non-ASCII characters! The characters that are causing this
> are:
>
>              position: 2465 of 4273 (58%), column: 30
>             character: ⓐ (displayed as ⓐ) (codepoint 9424, #o22320, #x24d0)
>     preferred charset: unicode (Unicode (ISO10646))
> code point in charset: 0x24D0
>                script: symbol
>                syntax: w which means: word
>              category: .:Base, L:Left-to-right (strong), h:Korean, j:Japanese, l:Latin
>              to input: type "C-x 8 RET 24d0" or "C-x 8 RET CIRCLED LATIN SMALL LETTER A"
>           buffer code: #xE2 #x93 #x90
>             file code: #xE2 #x93 #x90 (encoded by coding system utf-8-unix)
>               display: by this font (glyph code)
>     uniscribe:-outline-Malgun Gothic-normal-normal-normal-sans-13-*-*-*-p-*-ksc5601.1987-0 (#xDB)

Then I think installing the Symbola font will make the problem go away
for you even without setting inhibit-compacting-font-caches non-nil.



Reply | Threaded
Open this post in threaded view
|

bug#25148:

Kristiyan Kanchev
In reply to this post by Kristiyan Kanchev


On Wed, Dec 14, 2016 at 7:00 PM, <[hidden email]> wrote:
Ahaaaa!
Yes, I have non-ASCII characters! The characters that are causing this
are:

             position: 2465 of 4273 (58%), column: 30
            character: ⓐ (displayed as ⓐ) (codepoint 9424, #o22320, #x24d0)
    preferred charset: unicode (Unicode (ISO10646))
code point in charset: 0x24D0
               script: symbol
               syntax: w        which means: word
             category: .:Base, L:Left-to-right (strong), h:Korean, j:Japanese, l:Latin
             to input: type "C-x 8 RET 24d0" or "C-x 8 RET CIRCLED LATIN SMALL LETTER A"
          buffer code: #xE2 #x93 #x90
            file code: #xE2 #x93 #x90 (encoded by coding system utf-8-unix)
              display: by this font (glyph code)
    uniscribe:-outline-Malgun Gothic-normal-normal-normal-sans-13-*-*-*-p-*-ksc5601.1987-0 (#xDB)

Character code properties: customize what to show
  name: CIRCLED LATIN SMALL LETTER A
  general-category: So (Symbol, Other)
  decomposition: (circle 97) (circle 'a')

There are text properties here:
  face                 font-lock-string-face
  fontified            t

and:

             position: 2832 of 4394 (64%), column: 30
            character: ⓒ (displayed as ⓒ) (codepoint 9426, #o22322, #x24d2)
    preferred charset: unicode (Unicode (ISO10646))
code point in charset: 0x24D2
               script: symbol
               syntax: w        which means: word
             category: .:Base, L:Left-to-right (strong), h:Korean, j:Japanese, l:Latin
             to input: type "C-x 8 RET 24d2" or "C-x 8 RET CIRCLED LATIN SMALL LETTER C"
          buffer code: #xE2 #x93 #x92
            file code: #xE2 #x93 #x92 (encoded by coding system utf-8-unix)
              display: by this font (glyph code)
    uniscribe:-outline-Malgun Gothic-normal-normal-normal-sans-13-*-*-*-p-*-ksc5601.1987-0 (#xDD)

Character code properties: customize what to show
  name: CIRCLED LATIN SMALL LETTER C
  general-category: So (Symbol, Other)
  decomposition: (circle 99) (circle 'c')

There are text properties here:
  face                 font-lock-string-face
  fontified            t


If I remove these symbols from the init file scrolling gets very
smooth. So I guess the Malgun Gothic is the culprit!


I'll try tomorrow when I go back to work. However, It would be good to have proper
fix for when new people want to use Emacs and the standard fonts that come
with Windows.

--
//
Reply | Threaded
Open this post in threaded view
|

bug#25148:

Kristiyan Kanchev
Thank you for the help!

Kriss

On Wed, Dec 14, 2016 at 8:14 PM, Kristiyan Kanchev <[hidden email]> wrote:


On Wed, Dec 14, 2016 at 7:00 PM, <[hidden email]> wrote:
Ahaaaa!
Yes, I have non-ASCII characters! The characters that are causing this
are:

             position: 2465 of 4273 (58%), column: 30
            character: ⓐ (displayed as ⓐ) (codepoint 9424, #o22320, #x24d0)
    preferred charset: unicode (Unicode (ISO10646))
code point in charset: 0x24D0
               script: symbol
               syntax: w        which means: word
             category: .:Base, L:Left-to-right (strong), h:Korean, j:Japanese, l:Latin
             to input: type "C-x 8 RET 24d0" or "C-x 8 RET CIRCLED LATIN SMALL LETTER A"
          buffer code: #xE2 #x93 #x90
            file code: #xE2 #x93 #x90 (encoded by coding system utf-8-unix)
              display: by this font (glyph code)
    uniscribe:-outline-Malgun Gothic-normal-normal-normal-sans-13-*-*-*-p-*-ksc5601.1987-0 (#xDB)

Character code properties: customize what to show
  name: CIRCLED LATIN SMALL LETTER A
  general-category: So (Symbol, Other)
  decomposition: (circle 97) (circle 'a')

There are text properties here:
  face                 font-lock-string-face
  fontified            t

and:

             position: 2832 of 4394 (64%), column: 30
            character: ⓒ (displayed as ⓒ) (codepoint 9426, #o22322, #x24d2)
    preferred charset: unicode (Unicode (ISO10646))
code point in charset: 0x24D2
               script: symbol
               syntax: w        which means: word
             category: .:Base, L:Left-to-right (strong), h:Korean, j:Japanese, l:Latin
             to input: type "C-x 8 RET 24d2" or "C-x 8 RET CIRCLED LATIN SMALL LETTER C"
          buffer code: #xE2 #x93 #x92
            file code: #xE2 #x93 #x92 (encoded by coding system utf-8-unix)
              display: by this font (glyph code)
    uniscribe:-outline-Malgun Gothic-normal-normal-normal-sans-13-*-*-*-p-*-ksc5601.1987-0 (#xDD)

Character code properties: customize what to show
  name: CIRCLED LATIN SMALL LETTER C
  general-category: So (Symbol, Other)
  decomposition: (circle 99) (circle 'c')

There are text properties here:
  face                 font-lock-string-face
  fontified            t


If I remove these symbols from the init file scrolling gets very
smooth. So I guess the Malgun Gothic is the culprit!


I'll try tomorrow when I go back to work. However, It would be good to have proper
fix for when new people want to use Emacs and the standard fonts that come
with Windows.

--
//



--
//
Reply | Threaded
Open this post in threaded view
|

bug#25148:

Eli Zaretskii
In reply to this post by Kristiyan Kanchev
> From: Kristiyan Kanchev <[hidden email]>
> Date: Wed, 14 Dec 2016 20:14:22 +0200
>
> I'll try tomorrow when I go back to work. However, It would be good to have proper
> fix for when new people want to use Emacs and the standard fonts that come
> with Windows.

I agree, but I don't know how to do that: evidently, Windows doesn't
have fonts that support these symbols, except in a font that claims to
support Korean locales (?).



Reply | Threaded
Open this post in threaded view
|

bug#25148:

Lars Ingebrigtsen
In reply to this post by Kristiyan Kanchev
[hidden email] writes:

> I've just built emacs 25.1.90 and after settings
> inhibit-compacting-font-caches to t the problem went away!

That is now the default under Windows in Emacs 27, so I don't think
there's any more to do in this bug report, and I'm closing it.

If you're still seeing problems, please reopen.

--
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no