unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#28535: 25.2; Composed charater colon slows down Emacs performance while you in buffer with this character
@ 2017-09-21 10:35 Oleksandr Gavenko
  2017-09-21 10:50 ` Eli Zaretskii
  0 siblings, 1 reply; 6+ messages in thread
From: Oleksandr Gavenko @ 2017-09-21 10:35 UTC (permalink / raw)
  To: 28535

In GNU Emacs 25.2.1 (i686-w64-mingw32)
 of 2017-04-24 built on LAPHROAIG
Windowing system distributor 'Microsoft Corp.', version 10.0.16288

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

Important settings:
  value of $LANG: en_US.utf8
  locale-coding-system: cp1252

With composed two colon characters Emacs become extremely slow.

I figured that out when enabled cfengin3-mode and two colons :: was shown as
single composed character.

With runemacs -Q it slows down when you cross that character by moving
pointer.

Here's info in cfengine-mode buffer for composition:

               position: 110 of 136 (80%), column: 7
              character: : (displayed as :) (codepoint 58, #o72, #x3a)
      preferred charset: ascii (ASCII (ISO646 IRV))
  code point in charset: 0x3A
                 script: latin
                 syntax: . 	which means: punctuation
               category: .:Base, a:ASCII, l:Latin, r:Roman
               to input: type "C-x 8 RET 3a" or "C-x 8 RET COLON"
            buffer code: #x3A
              file code: #x3A (encoded by coding system undecided-dos)
                display: composed to form "::" (see below)

  Composed with the following character(s) ":" by the rule:
      (?∷)
  The component character(s) are displayed by these fonts (glyph codes):
   ∷: uniscribe:-outline-MS Gothic-normal-normal-normal-mono-13-*-*-*-c-*-gb2312.1980-0 (#x49D)
  See the variable ‘reference-point-alist’ for the meaning of the rule.

  Character code properties: customize what to show
    name: COLON
    general-category: Po (Punctuation, Other)
    decomposition: (58) (':')

  There are text properties here:
    composition          [Show]
    fontified            t
    prettify-symbols-end 112
    prettify-symbols-start 110

Here's info about character that represent composition:

              character: ∷ (displayed as ∷) (codepoint 8759, #o21067, #x2237)
      preferred charset: unicode (Unicode (ISO10646))
  code point in charset: 0x2237
                 script: symbol
                 syntax: . 	which means: punctuation
               category: .:Base, c:Chinese
               to input: type "C-x 8 RET 2237" or "C-x 8 RET PROPORTION"
            buffer code: #xE2 #x88 #xB7
              file code: #xE2 #x88 #xB7 (encoded by coding system utf-8-emacs-dos)
                display: composed to form "∷" (see below)

  Composed by the rule:
      (TAB ?∷ TAB)
  The component character(s) are displayed by these fonts (glyph codes):
   ∷: uniscribe:-outline-MS Gothic-normal-normal-normal-mono-13-*-*-*-c-*-gb2312.1980-0 (#x49D)
  See the variable ‘reference-point-alist’ for the meaning of the rule.

  Character code properties: customize what to show
    name: PROPORTION
    general-category: Sm (Symbol, Math)
    decomposition: (8759) ('∷')

  There are text properties here:
    composition          [Show]
    fontified            t

Composition [Show] expanded to:

(4 1
   [9 8759 9])


-- 
http://defun.work/





^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#28535: 25.2; Composed charater colon slows down Emacs performance while you in buffer with this character
  2017-09-21 10:35 bug#28535: 25.2; Composed charater colon slows down Emacs performance while you in buffer with this character Oleksandr Gavenko
@ 2017-09-21 10:50 ` Eli Zaretskii
  2017-09-21 16:12   ` Oleksandr Gavenko
  0 siblings, 1 reply; 6+ messages in thread
From: Eli Zaretskii @ 2017-09-21 10:50 UTC (permalink / raw)
  To: Oleksandr Gavenko; +Cc: 28535

> From: Oleksandr Gavenko <gavenkoa@gmail.com>
> Date: Thu, 21 Sep 2017 13:35:28 +0300
> 
> With composed two colon characters Emacs become extremely slow.
> 
> I figured that out when enabled cfengin3-mode and two colons :: was shown as
> single composed character.
> 
> With runemacs -Q it slows down when you cross that character by moving
> pointer.

Please provide a simple reproduction recipe, for reference, if you
can.

>                position: 110 of 136 (80%), column: 7
>               character: : (displayed as :) (codepoint 58, #o72, #x3a)
>       preferred charset: ascii (ASCII (ISO646 IRV))
>   code point in charset: 0x3A
>                  script: latin
>                  syntax: . 	which means: punctuation
>                category: .:Base, a:ASCII, l:Latin, r:Roman
>                to input: type "C-x 8 RET 3a" or "C-x 8 RET COLON"
>             buffer code: #x3A
>               file code: #x3A (encoded by coding system undecided-dos)
>                 display: composed to form "::" (see below)
> 
>   Composed with the following character(s) ":" by the rule:
>       (?∷)
>   The component character(s) are displayed by these fonts (glyph codes):
>    ∷: uniscribe:-outline-MS Gothic-normal-normal-normal-mono-13-*-*-*-c-*-gb2312.1980-0 (#x49D)
>   See the variable ‘reference-point-alist’ for the meaning of the rule.

MS Gothic is known as a trouble-maker in this context.  Can you try
installing Symbola?  Doing that might eliminate the problem.  Emacs
will automatically use Symbola, if installed, for such characters.

Another possible remedy is to customize inhibit-compacting-font-caches
to a non-nil value.





^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#28535: 25.2; Composed charater colon slows down Emacs performance while you in buffer with this character
  2017-09-21 10:50 ` Eli Zaretskii
@ 2017-09-21 16:12   ` Oleksandr Gavenko
  2017-09-21 16:50     ` Eli Zaretskii
  0 siblings, 1 reply; 6+ messages in thread
From: Oleksandr Gavenko @ 2017-09-21 16:12 UTC (permalink / raw)
  Cc: 28535

[-- Attachment #1: Type: text/plain, Size: 2812 bytes --]

On Thu, Sep 21, 2017 at 1:50 PM, Eli Zaretskii <eliz@gnu.org> wrote:

> > From: Oleksandr Gavenko <gavenkoa@gmail.com>
> > Date: Thu, 21 Sep 2017 13:35:28 +0300
> >
> > With composed two colon characters Emacs become extremely slow.
> >
> > I figured that out when enabled cfengin3-mode and two colons :: was
> shown as
> > single composed character.
> >
> > With runemacs -Q it slows down when you cross that character by moving
> > pointer.
>
> Please provide a simple reproduction recipe, for reference, if you
> can.
>
> Run native W32 Emacs 25.2.1.

With C-x 8 RET 2237 RET I place "problematic" character into buffer and
Emacs becomes to have problem with responsiveness (when I move cursor,
especially if it cross problematic character).

Possibly it is a problem with redisplaying what is on screen.

That is not a single character that cause problem. I detect a lot of them
inside buffer:

M-x describe-input-method RET TeX RET

It seems that any which isn't same width as "Courier New" - cause a problem.


> >   The component character(s) are displayed by these fonts (glyph codes):
> >    ∷: uniscribe:-outline-MS Gothic-normal-normal-normal-
> mono-13-*-*-*-c-*-gb2312.1980-0 (#x49D)
> >   See the variable ‘reference-point-alist’ for the meaning of the rule.
>
> MS Gothic is known as a trouble-maker in this context.  Can you try
> installing Symbola?  Doing that might eliminate the problem.  Emacs
> will automatically use Symbola, if installed, for such characters.
>
> Another possible remedy is to customize inhibit-compacting-font-caches
> to a non-nil value.
>

With:

(setq inhibit-compacting-font-caches t)

redisplay lags was disappeared on cursor moves.

I searched for suggested font and before figured out how to install fonts
on Windows I looked to charmap.exe and found that I already had Dejavu Sans
Mono which covers special characters.

I ended with adjusting my previous settings ("symbol" part) to:

(cond
 ((eq window-system 'x)
  (if (and (fboundp 'find-font) (find-font (font-spec :name "DejaVu Sans
Mono-11:weight=normal")))
      (set-frame-font "DejaVu Sans Mono-11")
    (set-frame-font "7x14")))
 ((eq window-system 'w32)
  (set-frame-font "Courier New-10:antialias=none")
  (set-fontset-font nil 'cyrillic "Courier New-10:antialias=none")
  (set-fontset-font nil 'greek "Courier New-10:antialias=none")
  (set-fontset-font nil 'phonetic "Courier New-10:antialias=none")
  (set-fontset-font nil 'symbol "DejaVu Sans Mono-10:antialias=none")))

That is better then looking to ugly MS Gothic font.

Is it possible to adjust font choosing preference to try well known fonts
(like DejaVu) before falling to ugly and buggy MS Gothic? So other Emacs
users will have less problems on Windows .

[-- Attachment #2: Type: text/html, Size: 4208 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#28535: 25.2; Composed charater colon slows down Emacs performance while you in buffer with this character
  2017-09-21 16:12   ` Oleksandr Gavenko
@ 2017-09-21 16:50     ` Eli Zaretskii
  2017-09-21 17:06       ` Oleksandr Gavenko
  0 siblings, 1 reply; 6+ messages in thread
From: Eli Zaretskii @ 2017-09-21 16:50 UTC (permalink / raw)
  To: Oleksandr Gavenko; +Cc: 28535

> From: Oleksandr Gavenko <gavenkoa@gmail.com>
> Date: Thu, 21 Sep 2017 19:12:25 +0300
> Cc: 28535@debbugs.gnu.org
> 
>  Please provide a simple reproduction recipe, for reference, if you
>  can.
> 
> Run native W32 Emacs 25.2.1.
> 
> With C-x 8 RET 2237 RET I place "problematic" character into buffer and Emacs becomes to have problem
> with responsiveness (when I move cursor, especially if it cross problematic character).

Thanks.

> That is not a single character that cause problem. I detect a lot of them inside buffer:
> 
> M-x describe-input-method RET TeX RET
> 
> It seems that any which isn't same width as "Courier New" - cause a problem.

IME, only some fonts cause this, MS Gothic is one of them.

> With:
> 
> (setq inhibit-compacting-font-caches t) 
> 
> redisplay lags was disappeared on cursor moves.

Great, then I guess this bug can be closed?

> Is it possible to adjust font choosing preference to try well known fonts (like DejaVu) before falling to ugly and
> buggy MS Gothic? So other Emacs users will have less problems on Windows .

We already do that by default, but we prefer Symbola, as its coverage
is much better.

If you want to use DejaVu Sans Mono instead, you can customize your
fontset accordingly, see fontset.el for examples of how to do that.





^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#28535: 25.2; Composed charater colon slows down Emacs performance while you in buffer with this character
  2017-09-21 16:50     ` Eli Zaretskii
@ 2017-09-21 17:06       ` Oleksandr Gavenko
  2017-09-21 17:18         ` Eli Zaretskii
  0 siblings, 1 reply; 6+ messages in thread
From: Oleksandr Gavenko @ 2017-09-21 17:06 UTC (permalink / raw)
  Cc: 28535

[-- Attachment #1: Type: text/plain, Size: 1577 bytes --]

On Thu, Sep 21, 2017 at 7:50 PM, Eli Zaretskii <eliz@gnu.org> wrote:

> > From: Oleksandr Gavenko <gavenkoa@gmail.com>
> > Date: Thu, 21 Sep 2017 19:12:25 +0300
> > Cc: 28535@debbugs.gnu.org
> >
> > With:
> >
> > (setq inhibit-compacting-font-caches t)
> >
> > redisplay lags was disappeared on cursor moves.
>
> Great, then I guess this bug can be closed?
>
> Yes. Though I prefer to set:

(set-fontset-font nil 'symbol "DejaVu Sans Mono-10:antialias=none")

Emacs font fallback mechanism started to pick "DejaVu Sans Mono" even when
special characters is defined to be displayed with Symbola.

> Is it possible to adjust font choosing preference to try well known fonts
> (like DejaVu) before falling to ugly and
> > buggy MS Gothic? So other Emacs users will have less problems on Windows
> .
>
> We already do that by default, but we prefer Symbola, as its coverage
> is much better.
>
> If you want to use DejaVu Sans Mono instead, you can customize your
> fontset accordingly, see fontset.el for examples of how to do that.
>

OK. It seems a bit complicated to configure too many character regions. As
I wrote above Emacs somehow started to prefer "DejaVu Sans Mono" as
fallback font and I don't need to do anything else for now.

But it is better to install necessary fonts. At least I know where to
search for spec.

For example it is very surprising to see specific font for drawing boxes:

  ;; Box Drawing and Block Elements
  (set-fontset-font "fontset-default" '(#x2500 . #x259F)
                    '("FreeMono" . "iso10646-1") nil 'prepend)

Thanks for support!

[-- Attachment #2: Type: text/html, Size: 2670 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#28535: 25.2; Composed charater colon slows down Emacs performance while you in buffer with this character
  2017-09-21 17:06       ` Oleksandr Gavenko
@ 2017-09-21 17:18         ` Eli Zaretskii
  0 siblings, 0 replies; 6+ messages in thread
From: Eli Zaretskii @ 2017-09-21 17:18 UTC (permalink / raw)
  To: Oleksandr Gavenko; +Cc: 28535

> From: Oleksandr Gavenko <gavenkoa@gmail.com>
> Date: Thu, 21 Sep 2017 20:06:47 +0300
> Cc: 28535@debbugs.gnu.org
> 
>  Great, then I guess this bug can be closed?
> 
> Yes.

Done, thanks.

> Though I prefer to set:
> 
> (set-fontset-font nil 'symbol "DejaVu Sans Mono-10:antialias=none")

There's no end to customizing font sets, and no single font satisfies
everyone.  We had to stop somewhere and leave the rest to local
customizations.

> For example it is very surprising to see specific font for drawing boxes:
> 
> ;; Box Drawing and Block Elements
> (set-fontset-font "fontset-default" '(#x2500 . #x259F)
> '("FreeMono" . "iso10646-1") nil 'prepend)

That's for GNU/Linux systems, as this font is widely available there,
and covers well this range of characters.





^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2017-09-21 17:18 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-09-21 10:35 bug#28535: 25.2; Composed charater colon slows down Emacs performance while you in buffer with this character Oleksandr Gavenko
2017-09-21 10:50 ` Eli Zaretskii
2017-09-21 16:12   ` Oleksandr Gavenko
2017-09-21 16:50     ` Eli Zaretskii
2017-09-21 17:06       ` Oleksandr Gavenko
2017-09-21 17:18         ` Eli Zaretskii

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).