unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#59530: 29.0.50; Fontification hangs with C header file
@ 2022-11-24  4:02 Sujith Manoharan
  2022-11-26 11:02 ` Eli Zaretskii
  2022-11-26 15:09 ` Alan Mackenzie
  0 siblings, 2 replies; 6+ messages in thread
From: Sujith Manoharan @ 2022-11-24  4:02 UTC (permalink / raw)
  To: 59530

Opening this header file with lots of macros makes Emacs
very slow.

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/gpu/drm/amd/include/asic_reg/dce/dce_12_0_sh_mask.h

Same behavior is seen with other header files inside asic_reg.
Fontification/scrolling hangs Emacs and it becomes unusable.

Bug #25706 suggested the workaround 'fast-but-imprecise-scrolling',
but enabling it doesn't seem to improve things now.


In GNU Emacs 29.0.50 (build 2, x86_64-pc-linux-gnu, X toolkit, cairo
 version 1.17.6, Xaw scroll bars) of 2022-11-24 built on comp-lnx
Repository revision: b37604c263e4813dc2a8b80e4e9131a3961c4f3e
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12101004
System Description: Arch Linux

Configured using:
 'configure --prefix=/usr/local --enable-link-time-optimization
 --without-libsystemd --with-x-toolkit=lucid --without-dbus
 --without-gsettings --without-selinux --with-native-compilation
 --with-imagemagick 'CFLAGS=-O2 -march=native''

Configured features:
ACL CAIRO FREETYPE GIF GLIB GMP GNUTLS GPM HARFBUZZ IMAGEMAGICK JPEG
JSON LCMS2 LIBXML2 MODULES NATIVE_COMP NOTIFY INOTIFY PDUMPER PNG RSVG
SECCOMP SOUND SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS TREE_SITTER WEBP
X11 XDBE XIM XINPUT2 XPM LUCID ZLIB

Important settings:
  value of $LANG: en_IN.UTF-8
  locale-coding-system: utf-8-unix

Major mode: ELisp/d

Minor modes in effect:
  global-pg-break-lines-mode: t
  page-break-lines-mode: t
  save-place-mode: t
  savehist-mode: t
  tooltip-mode: t
  mouse-wheel-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  column-number-mode: 1
  line-number-mode: t
  indent-tabs-mode: t
  transient-mark-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t

Load-path shadows:
None found.

Features:
(shadow face-remap mu4e mu4e-org org ob ob-tangle ob-ref ob-lob ob-table
ob-exp org-macro org-footnote org-src ob-comint org-pcomplete pcomplete
org-list org-faces org-entities noutline outline org-version
ob-emacs-lisp ob-core ob-eval org-table oc-basic bibtex ol org-keys oc
org-compat advice org-macs org-loaddefs format-spec find-func mu4e-main
mu4e-view thingatpt comint ansi-osc cal-menu calendar cal-loaddefs
mu4e-headers mu4e-compose mu4e-draft mu4e-actions smtpmail mu4e-search
mu4e-lists mu4e-bookmarks mu4e-mark mu4e-message hl-line mu4e-contacts
mu4e-update mu4e-folders mu4e-server mu4e-context mu4e-obsolete
mu4e-vars mu4e-helpers mu4e-config bookmark pp emacsbug diff-mode
gnus-fun misearch multi-isearch mule-util qp sort smiley ansi-color
gnus-cite flow-fill mail-extr textsec uni-scripts idna-mapping
ucs-normalize uni-confusable textsec-check gnus-async gnus-bcklg
gnus-agent gnus-srvr gnus-score score-mode nnvirtual nntp gnus-ml
gnus-msg nndoc gnus-cache gnus-dup gnus-art mm-uu mml2015 mm-view
mml-smime smime dig gnus-sum shr pixel-fill kinsoku url-file svg dom
gnus-group gnus-undo gnus-start gnus-dbus dbus gnus-cloud nnimap nnmail
mail-source utf7 nnoo parse-time iso8601 gnus-spec gnus-int gnus-range
gnus-win gnus nnheader range wid-edit mm-archive message sendmail
yank-media rfc822 mml mml-sec epa derived epg rfc6068 epg-config
gnus-util text-property-search time-date mailabbrev gmm-utils mailheader
mail-utils gnutls network-stream url-cache display-line-numbers
debbugs-gnu add-log debbugs-compat debbugs soap-client mm-decode
mm-bodies mm-encode url-http url-auth mail-parse rfc2231 rfc2047 rfc2045
mm-util ietf-drums mail-prsvr url-gw nsm puny rng-xsd rng-dt rng-util
xsd-regexp xml xcscope ring ido dired-x dired dired-loaddefs disp-table
easy-mmode page-break-lines cycbuf saveplace savehist comp comp-cstr
warnings icons rx cl-extra help-mode vlf-autoloads cycbuf-autoloads
emms-autoloads page-break-lines-autoloads w3m-load w3m-autoloads
nov-autoloads esxml-autoloads elisp-benchmarks-autoloads kv-autoloads
markdown-mode-autoloads visual-fill-column-autoloads info
debbugs-autoloads package browse-url url url-proxy url-privacy
url-expand url-methods url-history url-cookie generate-lisp-file
url-domsuf url-util mailcap url-handlers url-parse auth-source cl-seq
eieio eieio-core cl-macs password-cache json subr-x map byte-opt gv
bytecomp byte-compile url-vars cl-loaddefs cl-lib rmc iso-transl tooltip
cconv eldoc paren electric uniquify ediff-hook vc-hooks lisp-float-type
elisp-mode mwheel term/x-win x-win term/common-win x-dnd tool-bar dnd
fontset image regexp-opt fringe tabulated-list replace newcomment
text-mode lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow
isearch easymenu timer select scroll-bar mouse jit-lock font-lock syntax
font-core term/tty-colors frame minibuffer nadvice seq simple cl-generic
indonesian philippine 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 emoji-zwj charscript charprop case-table epa-hook
jka-cmpr-hook help abbrev obarray oclosure cl-preloaded button loaddefs
theme-loaddefs faces cus-face macroexp files window text-properties
overlay sha1 md5 base64 format env code-pages mule custom widget keymap
hashtable-print-readable backquote threads inotify lcms2 dynamic-setting
font-render-setting cairo x-toolkit xinput2 x multi-tty
make-network-process native-compile emacs)

Memory information:
((conses 16 500168 20588)
 (symbols 48 25070 7)
 (strings 32 111874 5151)
 (string-bytes 1 3139956)
 (vectors 16 72444)
 (vector-slots 8 1167524 27317)
 (floats 8 733 134)
 (intervals 56 3981 360)
 (buffers 992 23))





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

* bug#59530: 29.0.50; Fontification hangs with C header file
  2022-11-24  4:02 bug#59530: 29.0.50; Fontification hangs with C header file Sujith Manoharan
@ 2022-11-26 11:02 ` Eli Zaretskii
  2022-11-26 14:11   ` Alan Mackenzie
  2022-11-26 15:09 ` Alan Mackenzie
  1 sibling, 1 reply; 6+ messages in thread
From: Eli Zaretskii @ 2022-11-26 11:02 UTC (permalink / raw)
  To: Sujith Manoharan, Alan Mackenzie; +Cc: 59530

> From: Sujith Manoharan <sujith.wall@gmail.com>
> Date: Thu, 24 Nov 2022 09:32:03 +0530
> 
> Opening this header file with lots of macros makes Emacs
> very slow.
> 
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/gpu/drm/amd/include/asic_reg/dce/dce_12_0_sh_mask.h
> 
> Same behavior is seen with other header files inside asic_reg.
> Fontification/scrolling hangs Emacs and it becomes unusable.
> 
> Bug #25706 suggested the workaround 'fast-but-imprecise-scrolling',
> but enabling it doesn't seem to improve things now.

Alan, did you see this bug report?





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

* bug#59530: 29.0.50; Fontification hangs with C header file
  2022-11-26 11:02 ` Eli Zaretskii
@ 2022-11-26 14:11   ` Alan Mackenzie
  0 siblings, 0 replies; 6+ messages in thread
From: Alan Mackenzie @ 2022-11-26 14:11 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: Sujith Manoharan, 59530

Hello, Eli.

On Sat, Nov 26, 2022 at 13:02:38 +0200, Eli Zaretskii wrote:
> > From: Sujith Manoharan <sujith.wall@gmail.com>
> > Date: Thu, 24 Nov 2022 09:32:03 +0530

> > Opening this header file with lots of macros makes Emacs
> > very slow.

> > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/gpu/drm/amd/include/asic_reg/dce/dce_12_0_sh_mask.h

> > Same behavior is seen with other header files inside asic_reg.
> > Fontification/scrolling hangs Emacs and it becomes unusable.

> > Bug #25706 suggested the workaround 'fast-but-imprecise-scrolling',
> > but enabling it doesn't seem to improve things now.

> Alan, did you see this bug report?

I hadn't, no, but I think it's already been fixed by the following
commit:

commit 3208a42c47c4f98cb03c4b15164ca83113244b40
Author: Alan Mackenzie <acm@muc.de>
Date:   Thu Nov 24 10:51:03 2022 +0000

    CC Mode: Make it scroll fast over buffers with only #define's

The OP's test file was around 6 MB big.  When I scrolled all the way
through it, it took around 32 seconds.

I'll look into this more carefully, and get in touch with the OP.

Thanks!

-- 
Alan Mackenzie (Nuremberg, Germany).





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

* bug#59530: 29.0.50; Fontification hangs with C header file
  2022-11-24  4:02 bug#59530: 29.0.50; Fontification hangs with C header file Sujith Manoharan
  2022-11-26 11:02 ` Eli Zaretskii
@ 2022-11-26 15:09 ` Alan Mackenzie
  2022-11-27  8:45   ` Sujith Manoharan
  1 sibling, 1 reply; 6+ messages in thread
From: Alan Mackenzie @ 2022-11-26 15:09 UTC (permalink / raw)
  To: Sujith Manoharan; +Cc: 59530

Hello, Sujith.

On Thu, Nov 24, 2022 at 09:32:03 +0530, Sujith Manoharan wrote:
> Opening this header file with lots of macros makes Emacs
> very slow.

> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/gpu/drm/amd/include/asic_reg/dce/dce_12_0_sh_mask.h

> Same behavior is seen with other header files inside asic_reg.
> Fontification/scrolling hangs Emacs and it becomes unusable.

Thanks for taking the trouble to report this bug, and sorry for the
irritation it has caused.

> Bug #25706 suggested the workaround 'fast-but-imprecise-scrolling',
> but enabling it doesn't seem to improve things now.

I think the bug has already been fixed, coincidentally on Thursday, by
the following commit to master:

commit 3208a42c47c4f98cb03c4b15164ca83113244b40
Author: Alan Mackenzie <acm@muc.de>
Date:   Thu Nov 24 10:51:03 2022 +0000

    CC Mode: Make it scroll fast over buffers with only #define's

, committed just a few hours after you reported the bug.

I have a test script which scrolls all the way through a file, timing
how long it takes.  Before the above commit, it took ~1524 seconds on
dce_12-0_sh_mask.h, after the commit, it took ~31.4 seconds.

Would you please update your Emacs version, and see if this commit has
indeed resolved the problem, then let us know.

Thanks!

> In GNU Emacs 29.0.50 (build 2, x86_64-pc-linux-gnu, X toolkit, cairo
>  version 1.17.6, Xaw scroll bars) of 2022-11-24 built on comp-lnx
> Repository revision: b37604c263e4813dc2a8b80e4e9131a3961c4f3e
> Repository branch: master
> Windowing system distributor 'The X.Org Foundation', version 11.0.12101004
> System Description: Arch Linux

[ .... ]

-- 
Alan Mackenzie (Nuremberg, Germany).





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

* bug#59530: 29.0.50; Fontification hangs with C header file
  2022-11-26 15:09 ` Alan Mackenzie
@ 2022-11-27  8:45   ` Sujith Manoharan
  2022-11-28 19:46     ` Alan Mackenzie
  0 siblings, 1 reply; 6+ messages in thread
From: Sujith Manoharan @ 2022-11-27  8:45 UTC (permalink / raw)
  To: Alan Mackenzie; +Cc: 59530

Alan Mackenzie <acm@muc.de> writes:
> I think the bug has already been fixed, coincidentally on Thursday, by
> the following commit to master:
>
> commit 3208a42c47c4f98cb03c4b15164ca83113244b40
> Author: Alan Mackenzie <acm@muc.de>
> Date:   Thu Nov 24 10:51:03 2022 +0000
>
>     CC Mode: Make it scroll fast over buffers with only #define's
>
> , committed just a few hours after you reported the bug.
>
> I have a test script which scrolls all the way through a file, timing
> how long it takes.  Before the above commit, it took ~1524 seconds on
> dce_12-0_sh_mask.h, after the commit, it took ~31.4 seconds.
>
> Would you please update your Emacs version, and see if this commit has
> indeed resolved the problem, then let us know.

This commit fixes the issue. It doesn't look like
fast-but-imprecise-scrolling is needed anymore at all.

Thanks !

Sujith





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

* bug#59530: 29.0.50; Fontification hangs with C header file
  2022-11-27  8:45   ` Sujith Manoharan
@ 2022-11-28 19:46     ` Alan Mackenzie
  0 siblings, 0 replies; 6+ messages in thread
From: Alan Mackenzie @ 2022-11-28 19:46 UTC (permalink / raw)
  To: Sujith Manoharan; +Cc: Eli Zaretskii, 59530-done

Hello, Sujith.

On Sun, Nov 27, 2022 at 14:15:26 +0530, Sujith Manoharan wrote:
> Alan Mackenzie <acm@muc.de> writes:
> > I think the bug has already been fixed, coincidentally on Thursday, by
> > the following commit to master:

> > commit 3208a42c47c4f98cb03c4b15164ca83113244b40
> > Author: Alan Mackenzie <acm@muc.de>
> > Date:   Thu Nov 24 10:51:03 2022 +0000

> >     CC Mode: Make it scroll fast over buffers with only #define's

> > , committed just a few hours after you reported the bug.

> > I have a test script which scrolls all the way through a file, timing
> > how long it takes.  Before the above commit, it took ~1524 seconds on
> > dce_12-0_sh_mask.h, after the commit, it took ~31.4 seconds.

> > Would you please update your Emacs version, and see if this commit has
> > indeed resolved the problem, then let us know.

> This commit fixes the issue. It doesn't look like
> fast-but-imprecise-scrolling is needed anymore at all.

> Thanks !

Thank you for the testing, and I'm glad it works.  I'm closing the bug
with this post.

> Sujith

-- 
Alan Mackenzie (Nuremberg, Germany).





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

end of thread, other threads:[~2022-11-28 19:46 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-24  4:02 bug#59530: 29.0.50; Fontification hangs with C header file Sujith Manoharan
2022-11-26 11:02 ` Eli Zaretskii
2022-11-26 14:11   ` Alan Mackenzie
2022-11-26 15:09 ` Alan Mackenzie
2022-11-27  8:45   ` Sujith Manoharan
2022-11-28 19:46     ` Alan Mackenzie

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