bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#21028: Performance regression in revision af1a69f4d17a482c359d98c00e


From: Clément Pit--Claudel
Subject: bug#21028: Performance regression in revision af1a69f4d17a482c359d98c00ef86fac835b5fac (Apr 2014).
Date: Fri, 10 Jul 2015 09:02:30 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0

On 07/10/2015 05:30 AM, Eli Zaretskii wrote:
>> Date: Fri, 10 Jul 2015 03:34:23 -0700
>> From: Clément Pit--Claudel
>>  <clement.pitclaudel@live.com>
>>
>> 2. Run the following code:
>>     (progn
>>      (dotimes (_ 3)
>>        (set-fontset-font t 'unicode (font-spec :name "Arial") nil 'append))
>>      (dotimes (_ 50)  
>>        (insert "日本国\n")))
>> 3. Move the cursor around. Notice that motion is extremely slow (in 
>> particular C-p and C-n). So is shift-selection. (if it is not, try 
>> increasing the 3 above, maybe to 5 or 10).
>>
>> This test case is the smallest I could come up with; there might be other 
>> ways to trigger the problem. In my particular case, it is caused by having 
>> 10 or so distinct fontset rules, covering different blocks of characters. 
>> This problem was mentioned elsewhere online too (for example 
>> https://github.com/purcell/emacs.d/issues/273).
> 
> What kind of complex fontset setup do you have?  FWIW, I don't see any
> perceptible slowdown with your recipe and the default fontsets.

The relevant snippet looks like this:

(let ((cjk-font "WenQuanYi Micro Hei Mono")
      (fontset t)) ; "fontset-default"
  (set-fontset-font t (cons ?≔ ?≔) "FreeSerif" nil 'prepend)
  (set-fontset-font fontset 'unicode (font-spec :name "Consolas") nil 'append)
  (set-fontset-font fontset 'unicode (font-spec :name "Symbola") nil 'append)
  (set-fontset-font fontset '(#x4E00 . #x9FFF) (font-spec :name cjk-font))
  (set-fontset-font fontset '(#x3400 . #x4DFF) (font-spec :name cjk-font))
  (set-fontset-font fontset '(#x20000 . #x2A6DF) (font-spec :name cjk-font))
  (set-fontset-font fontset '(#xF900 . #xFAFF) (font-spec :name cjk-font))
  (set-fontset-font fontset '(#x2F800 . #x2FA1F) (font-spec :name cjk-font)))

Clément.

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]