From: Lordnik_PC@LORDNIKPC.i-did-not-set--mail-host-address--so-tickle-me To: bug-gnu-emacs@gnu.org Subject: 26.1; Emacs performance strike when using source-code-pro and unicodes together --text follows this line-- Hello, Explanation: emacs is extremly slow on my windows 10 when using the Source-Code-Pro-Font (https://github.com/adobe-fonts/source-code-pro) toeghter with any unicode-characters (tested with two examples θ and μ). I set the font by following lisp code in my init.el file: "(set-frame-font "-outline-Source Code Pro-normal-normal-normal-mono-*-*-*-*-c-*-windows-1258")" Question: On which side lies the error? On Emacs, on the Font, on Windows (as usual), or something between my chair and my keyboard(also, as usual)? Reproduction: - Install source-code-pro on your windows 10 - Open Emacs - Switch buffer to: *scratch* - ;;After setting the font. Copy&paste&execute the cmds step by step. As soon as the unicode (θ) is displayed in emacs, emacs will begin to proceed slowly after the font is set. - (set-frame-font "-outline-Source Code Pro-normal-normal-normal-mono-*-*-*-*-c-*-windows-1258") - (insert "a") ;; inserts fast - (insert "θ") ;; inserts slow, why? Profiler-Report: I created two reports with the profiler. One with the font "Alef" (just a random font where the problem don't occur.) And one with the Source-Code-Pro-Font. I just saw that with source code pro there are more bytes needed. Can you tell me more? Alef Font Report: - command-execute 11,083,771 98% - call-interactively 11,083,771 98% - funcall-interactively 11,048,283 98% - execute-extended-command 7,519,434 66% - command-execute 7,342,752 65% - call-interactively 7,342,752 65% - funcall-interactively 7,342,720 65% - profiler-report 7,342,720 65% - profiler-report-memory 5,432,405 48% - profiler-report-profile-other-window 3,570,197 31% - switch-to-buffer-other-window 3,527,209 31% - pop-to-buffer 3,527,209 31% - display-buffer 3,527,209 31% - display-buffer-use-some-window 3,527,209 31% window--display-buffer 3,526,209 31% - window-resize 1,000 0% - error 1,000 0% apply 1,000 0% - profiler-report-setup-buffer 42,988 0% - profiler-report-render-calltree 41,916 0% - profiler-report-rerender-calltree 41,916 0% - profiler-report-render-calltree-1 41,916 0% - profiler-calltree-build 33,024 0% - profiler-calltree-build-unified 33,024 0% - maphash 28,888 0% # 24,752 0% # 4,136 0% - profiler-report-insert-calltree-children 8,188 0% - mapc 8,188 0% - profiler-report-insert-calltree 8,188 0% profiler-report-line-format 8,188 0% profiler-report-move-to-entry 704 0% - profiler-report-setup-buffer-1 1,072 0% profiler-report-make-buffer-name 32 0% profiler-memory-profile 1,862,208 16% - profiler-report-cpu 1,910,315 16% - profiler-cpu-profile 1,897,750 16% profiler-make-profile 2,454 0% - profiler-report-profile-other-window 12,565 0% - profiler-report-setup-buffer 10,476 0% - profiler-report-render-calltree 9,404 0% - profiler-report-rerender-calltree 9,404 0% - profiler-report-render-calltree-1 9,404 0% - profiler-calltree-build 8,188 0% - profiler-calltree-compute-percentages 8,188 0% - profiler-calltree-walk 8,188 0% - profiler-calltree-walk 8,188 0% - profiler-calltree-walk 8,188 0% - profiler-calltree-walk 8,188 0% - profiler-calltree-walk 8,188 0% - # 8,188 0% profiler-format-percent 8,188 0% profiler-report-move-to-entry 704 0% - profiler-report-header-line-format 512 0% replace-regexp-in-string 512 0% - profiler-report-setup-buffer-1 1,072 0% profiler-report-make-buffer-name 32 0% - switch-to-buffer-other-window 2,089 0% - pop-to-buffer 2,089 0% - display-buffer 2,089 0% - display-buffer-use-some-window 2,089 0% window--display-buffer 1,089 0% - window-resize 1,000 0% - error 1,000 0% apply 1,000 0% - execute-extended-command--shorter 172,122 1% - completion-try-completion 172,122 1% - completion--nth-completion 172,122 1% - completion--some 172,122 1% - # 172,122 1% - completion-pcm-try-completion 172,122 1% - completion-pcm--merge-try 159,864 1% completion-pcm--merge-completions 12,480 0% - completion-pcm--find-all-completions 12,258 0% completion-pcm--all-completions 12,258 0% - sit-for 4,560 0% redisplay 4,560 0% - kill-buffer 3,526,209 31% - replace-buffer-in-windows 3,526,209 31% - switch-to-prev-buffer 3,526,209 31% set-window-buffer-start-and-point 3,526,209 31% - self-insert-command 1,536 0% flycheck-handle-change 1,536 0% - yank 1,024 0% - current-kill 512 0% - kill-new 512 0% menu-bar-update-yank-menu 512 0% - insert-for-yank 512 0% - insert-for-yank-1 512 0% flycheck-handle-change 512 0% - handle-focus-in 80 0% - run-hooks 80 0% - flycheck-display-error-at-point-soon 80 0% flycheck-overlays-at 80 0% - byte-code 23,852 0% - read-extended-command 23,852 0% - completing-read 23,852 0% - completing-read-default 23,852 0% - read-from-minibuffer 15,360 0% - command-execute 512 0% call-interactively 512 0% - completing-read-default 11,636 0% - read-from-minibuffer 5,322 0% - redisplay_internal (C function) 4,218 0% file-remote-p 4,218 0% - command-execute 16 0% call-interactively 16 0% - redisplay_internal (C function) 114,598 1% - jit-lock-function 84,730 0% - jit-lock-fontify-now 84,730 0% - jit-lock--run-functions 84,730 0% - run-hook-wrapped 84,730 0% - # 84,730 0% - font-lock-fontify-region 84,730 0% - font-lock-default-fontify-region 84,730 0% - font-lock-fontify-keywords-region 84,730 0% lisp--el-match-keyword 4,096 0% # 4,096 0% file-remote-p 29,868 0% - timer-event-handler 31,388 0% - apply 31,388 0% - flycheck-handle-idle-change 25,204 0% - flycheck-buffer-automatically 25,204 0% - flycheck-buffer 25,204 0% - flycheck-get-checker-for-buffer 24,564 0% - seq-find 24,564 0% - seq-do 24,564 0% - mapc 24,564 0% - # 24,564 0% - flycheck-may-use-checker 24,564 0% flycheck-checker-supports-major-mode-p 8,188 0% - flycheck-mark-all-overlays-for-deletion 320 0% flycheck-overlays-in 320 0% - flycheck-clear 320 0% - flycheck-delete-all-overlays 320 0% flycheck-overlays-in 320 0% - company-idle-begin 6,184 0% - company-auto-begin 6,184 0% - company--perform 6,184 0% - company--begin-new 6,184 0% - company-capf 4,136 0% - company--capf-data 4,136 0% - company--capf-data-real 4,136 0% - run-hook-wrapped 4,136 0% - completion--capf-wrapper 4,136 0% - elisp-completion-at-point 4,136 0% completion-table-merge 4,136 0% - company-files 1,536 0% - company-files--grab-existing-name 1,536 0% - company-grab-line 1,536 0% - company-grab 1,536 0% looking-back 1,536 0% - company--multi-backend-adapter 512 0% - company--force-sync 512 0% - apply 512 0% - company-dabbrev-code 512 0% company-grab-symbol 512 0% - winner-save-old-configurations 8,272 0% winner-remember 8,272 0% - flycheck-display-error-at-point-soon 480 0% flycheck-overlays-at 480 0% ... 0 0% -- End of Alef Font Report -- Source-Code-Pro-Font Report: - command-execute 70,705,811 76% - call-interactively 70,705,811 76% - funcall-interactively 53,749,219 57% - previous-line 43,518,530 46% - line-move 43,517,474 46% - line-move-visual 27,488,050 29% current-bidi-paragraph-direction 1,834 0% - line-move-partial 6,336 0% - default-line-height 6,336 0% default-font-height 6,336 0% - default-line-height 6,336 0% default-font-height 6,336 0% - window-inside-pixel-edges 2,890 0% - window-edges 1,056 0% window-current-scroll-bars 1,056 0% line-pixel-height 1,834 0% - called-interactively-p 1,056 0% - # 1,056 0% backtrace-frame 1,056 0% - execute-extended-command 5,668,654 6% - command-execute 5,363,382 5% - call-interactively 5,363,382 5% - funcall-interactively 5,360,116 5% - profiler-report 5,323,064 5% - profiler-report-memory 3,692,367 3% - profiler-memory-profile 1,897,130 2% profiler-make-profile 1,834 0% - profiler-report-profile-other-window 1,795,237 1% - switch-to-buffer-other-window 1,785,273 1% - pop-to-buffer 1,785,273 1% - display-buffer 1,785,273 1% - display-buffer-use-some-window 1,785,273 1% window--display-buffer 1,785,273 1% - profiler-report-setup-buffer 9,964 0% - profiler-report-render-calltree 8,892 0% - profiler-report-rerender-calltree 8,892 0% - profiler-report-render-calltree-1 8,892 0% - profiler-report-insert-calltree-children 8,188 0% - mapc 8,188 0% profiler-report-insert-calltree 8,188 0% profiler-report-move-to-entry 704 0% - profiler-report-setup-buffer-1 1,072 0% profiler-report-make-buffer-name 32 0% - profiler-report-cpu 1,630,697 1% profiler-cpu-profile 1,614,048 1% - profiler-report-profile-other-window 16,649 0% - profiler-report-setup-buffer 14,696 0% - profiler-report-render-calltree 13,624 0% - profiler-report-rerender-calltree 13,624 0% - profiler-report-render-calltree-1 13,624 0% - profiler-calltree-build 12,408 0% - profiler-calltree-build-unified 12,408 0% - maphash 4,136 0% # 4,136 0% profiler-report-move-to-entry 704 0% - profiler-report-header-line-format 512 0% replace-regexp-in-string 512 0% - profiler-report-setup-buffer-1 1,072 0% profiler-report-make-buffer-name 32 0% - switch-to-buffer-other-window 1,953 0% - pop-to-buffer 1,953 0% - display-buffer 1,953 0% - display-buffer-use-some-window 1,953 0% - window-resize 1,000 0% - error 1,000 0% apply 1,000 0% window--display-buffer 953 0% - fundamental-mode 37,052 0% - run-mode-hooks 37,052 0% - hack-local-variables 37,052 0% - hack-local-variables-prop-line 19,884 0% - set-auto-mode-1 19,884 0% - inhibit-local-variables-p 19,372 0% file-name-sans-versions 5,548 0% - inhibit-local-variables-p 14,336 0% file-name-sans-versions 512 0% - hack-dir-local-variables 2,832 0% - dir-locals-find-file 2,832 0% - locate-dominating-file 2,832 0% dir-locals--all-files 1,230 0% abbreviate-file-name 1,090 0% + byte-code 3,202 0% - execute-extended-command--shorter 182,200 0% - completion-try-completion 164,800 0% - completion--nth-completion 164,800 0% - completion--some 164,800 0% - # 164,800 0% - completion-pcm-try-completion 164,800 0% - completion-pcm--merge-try 151,590 0% completion-pcm--merge-completions 12,394 0% - completion-pcm--find-all-completions 13,210 0% - completion-pcm--all-completions 12,632 0% completion-pcm--pattern->regex 512 0% completion-pcm--string->pattern 578 0% - execute-extended-command--shorter-1 17,400 0% - execute-extended-command--shorter-1 17,400 0% - execute-extended-command--shorter-1 8,188 0% mapcar 8,188 0% mapcar 8,188 0% - sit-for 6,272 0% - redisplay 6,272 0% - redisplay_internal (C function) 2,560 0% file-remote-p 2,560 0% + save-buffer 4,383,668 4% + next-line 120,208 0% + profiler-report-toggle-entry 48,320 0% + paredit-kill 6,166 0% + self-insert-command 1,024 0% + yank 1,024 0% + kill-buffer 953 0% + indent-for-tab-command 512 0% + handle-focus-in 160 0% - byte-code 16,954,622 18% - read-extended-command 15,167,772 16% - completing-read 15,167,772 16% - completing-read-default 15,167,772 16% - read-from-minibuffer 15,160,148 16% - redisplay_internal (C function) 1,656,864 1% eval 2,454 0% - command-execute 944 0% call-interactively 944 0% - read-buffer-to-switch 1,786,850 1% - read-buffer 1,786,850 1% - completing-read-default 1,786,850 1% - read-from-minibuffer 624 0% - command-execute 560 0% - call-interactively 560 0% - funcall-interactively 512 0% - previous-line-or-history-element 512 0% - previous-line 512 0% - line-move 512 0% line-move-visual 512 0% - completing-read-default 1,970 0% - read-from-minibuffer 64 0% - command-execute 16 0% call-interactively 16 0% - redisplay_internal (C function) 22,015,781 23% - eval 65,814 0% if 44,352 0% - jit-lock-function 65,082 0% - jit-lock-fontify-now 63,732 0% - jit-lock--run-functions 63,732 0% - run-hook-wrapped 63,732 0% - # 63,732 0% - font-lock-fontify-region 63,732 0% - font-lock-default-fontify-region 63,732 0% - font-lock-fontify-keywords-region 63,732 0% lisp--el-match-keyword 3,760 0% # 3,680 0% file-remote-p 41,562 0% - # 1,056 0% apply 1,056 0% - winner-save-old-configurations 91,512 0% - winner-remember 91,512 0% - winner-win-data 8,448 0% - winner-sorted-window-list 5,280 0% - sort 4,224 0% # 4,224 0% winner-window-list 1,056 0% - timer-event-handler 62,768 0% - apply 53,256 0% - flycheck-handle-idle-change 50,088 0% - flycheck-buffer-automatically 50,088 0% - flycheck-buffer 50,088 0% - flycheck-get-checker-for-buffer 49,128 0% - seq-find 49,128 0% - seq-do 49,128 0% - mapc 49,128 0% - # 49,128 0% - flycheck-may-use-checker 49,128 0% flycheck-checker-supports-major-mode-p 32,752 0% - flycheck-mark-all-overlays-for-deletion 480 0% flycheck-overlays-in 480 0% - flycheck-clear 480 0% - flycheck-delete-all-overlays 480 0% flycheck-overlays-in 480 0% jit-lock-context-fontify 3,168 0% - timer-inc-time 3,168 0% timer-relative-time 2,112 0% timer-until 2,120 0% - timer-activate 2,112 0% - timer--activate 2,112 0% timer--time-less-p 2,112 0% - timer-activate-when-idle 2,112 0% - timer--activate 2,112 0% timer--time-less-p 2,112 0% - blink-cursor-end 1,056 0% remove-hook 1,056 0% - flycheck-display-error-at-point-soon 1,040 0% flycheck-overlays-at 1,040 0% ... 0 0% -- End of Source Code Pro Font Report -- In GNU Emacs 26.1 (build 1, x86_64-w64-mingw32) of 2018-05-30 built on CIRROCUMULUS Repository revision: 07f8f9bc5a51f5aa94eb099f3e15fbe0c20ea1ea Windowing system distributor 'Microsoft Corp.', version 10.0.17134 Recent messages: You can run the command ‘profiler-report’ with M-x pro-rep RET After 0 kbd macro iterations: line-move-visual: End of buffer [19 times] Wrote c:/Users/Lordnik_PC/Desktop/report_unicode_source_code_pro_alef.txt ediff-files-internal: Files A and B are the same Reading file c:/Users/Lordnik_PC/Desktop/report_unicode_source_code_pro_alef.txt ... Reading file c:/Users/Lordnik_PC/Desktop/report_unicode_source_code_pro.txt ... Computing differences between report_unicode_source_code_pro_alef.txt and report_unicode_source_code_pro.txt ... Buffer A: Processing difference region 0 of 6 Buffer B: Processing difference region 0 of 6 Processing difference regions ... done Configured using: 'configure --without-dbus --host=x86_64-w64-mingw32 --without-compress-install 'CFLAGS=-O2 -static -g3'' Configured features: XPM JPEG TIFF GIF PNG RSVG SOUND NOTIFY ACL GNUTLS LIBXML2 ZLIB TOOLKIT_SCROLL_BARS THREADS LCMS2 Important settings: value of $LANG: DES locale-coding-system: cp1252 Major mode: Text Minor modes in effect: global-display-line-numbers-mode: t display-line-numbers-mode: t which-key-mode: t shell-dirtrack-mode: t savehist-mode: t winner-mode: t cl-old-struct-compat-mode: t tooltip-mode: t global-eldoc-mode: t electric-indent-mode: t mouse-wheel-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 column-number-mode: t line-number-mode: t transient-mark-mode: t Load-path shadows: c:/Users/Lordnik_PC/AppData/Roaming/.emacs.d/elpa/less-css-mode-20160930.2153/less-css-mode hides e:/emacs-26.1-x86_64/share/emacs/26.1/lisp/textmodes/less-css-mode Features: (shadow sort mail-extr emacsbug message rmc puny dired dired-loaddefs rfc822 mml mml-sec epa derived epg gnus-util rmail rmail-loaddefs mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mail-utils jka-compr ediff-merg ediff-wind ediff-diff ediff-mult ediff-help ediff-init ediff-util ediff two-column misearch multi-isearch eieio-opt speedbar sb-image ezimage dframe help-fns radix-tree profiler display-line-numbers company-oddmuse company-keywords company-etags etags company-gtags company-dabbrev-code company-dabbrev company-files company-capf company-cmake company-xcode company-clang company-semantic company-eclim company-template company-css company-nxml company-bbdb company pcase undo-tree diff which-key linum flycheck cl-extra help-mode rx dash paredit nameless lisp-mnt elec-pair ess-site ess-toolbar ess-mouse mouseme browse-url ess-swv ess-noweb ess-noweb-font-lock-mode ess-bugs-l essd-els ess-xls-d ess-vst-d ess-stata-mode ess-stata-lang cc-vars cc-defs make-regexp ess-sp6-d ess-sp5-d ess-sp4-d ess-dde ess-sas-d ess-sas-l ess-sas-a ess-s4-d ess-s3-d ess-omg-d ess-omg-l ess-arc-d ess-lsp-l ess-sp6w-d ess-sp3-d ess-julia ess-r-mode ess-r-flymake flymake-proc flymake warnings thingatpt ess-r-xref xref project subr-x ess-trns ess-r-package ess-r-syntax ess-r-completion ess-roxy essddr ess-rd hideshow ess-s-lang ess-help ess ess-noweb-mode ess-inf ess-tracebug tramp tramp-compat tramp-loaddefs trampver ucs-normalize shell parse-time compile ess-utils ess-custom executable org-agenda org-element avl-tree generator org advice org-macro org-footnote org-pcomplete pcomplete org-list org-faces org-entities noutline outline easy-mmode org-version ob-emacs-lisp ob ob-tangle org-src ob-ref ob-lob ob-table ob-keys ob-exp ob-comint comint ansi-color ob-core ob-eval org-compat org-macs org-loaddefs format-spec find-func cal-menu calendar cal-loaddefs google-translate google-translate-default-ui google-translate-core-ui ido google-translate-core google-translate-tk url url-proxy url-privacy url-expand url-methods url-history url-cookie url-domsuf url-util mailcap json map edmacro kmacro savehist winner ring mm-util mail-prsvr dracula-theme iso-transl finder-inf ess-generics tex-site info package easymenu epg-config url-handlers url-parse auth-source cl-seq eieio eieio-core cl-macs eieio-loaddefs password-cache url-vars seq byte-opt gv bytecomp byte-compile cconv cl-loaddefs cl-lib time-date mule-util tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel dos-w32 ls-lisp disp-table term/w32-win w32-win w32-vars term/common-win tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode elisp-mode lisp-mode prog-mode register page menu-bar rfn-eshadow isearch timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core term/tty-colors 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 composite charscript charprop case-table epa-hook jka-cmpr-hook help simple abbrev obarray 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 lcms2 multi-tty make-network-process emacs) Memory information: ((conses 16 497849 56271) (symbols 56 42482 1) (miscs 48 1183 662) (strings 32 124851 9534) (string-bytes 1 3662767) (vectors 16 190638) (vector-slots 8 4240524 63812) (floats 8 211 709) (intervals 56 6037 963) (buffers 992 42))