all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Slow fontification in C mode buffers
@ 2011-12-03 13:19 Eli Zaretskii
  2011-12-03 15:03 ` Sujith
                   ` (2 more replies)
  0 siblings, 3 replies; 42+ messages in thread
From: Eli Zaretskii @ 2011-12-03 13:19 UTC (permalink / raw)
  To: emacs-devel; +Cc: Alan Mackenzie

Did anyone else notice that scrolling the first time through a very
large comment in C mode became extremely slow lately?  For example,
visit xdisp.c in "emacs -Q", type M-<, then hit C-v several times in
quick succession.  Then watch in disbelief how long it takes for Emacs
to scroll by these several screenfuls.  In my case (6.5 year old
hardware), I even see the "hourglass cursor" kick in, and the CPU
meter shows 100% utilization of one execution unit for about 5
seconds.

If you then type M-< and again hit C-v several times, scrolling will
be at its usual speed.  Scrolling outside of large comments is also
reasonably fast, even for the first time.

Therefore, my prime suspect is font-lock, which is triggered by the
need to display a portion of the buffer that was not fontified yet.
This suspicion is corroborated by the fact that jit-stealth font-lock
of xdisp.c causes extremely high peaks of CPU usage, and Emacs
response time becomes very sluggish.

Is there something in C Mode's arrangements for fontification,
specifically related to comments, that was changed lately and that can
explain this slowdown?



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

end of thread, other threads:[~2012-02-06 16:14 UTC | newest]

Thread overview: 42+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-03 13:19 Slow fontification in C mode buffers Eli Zaretskii
2011-12-03 15:03 ` Sujith
2011-12-03 15:14   ` Eli Zaretskii
2011-12-03 15:32     ` Sujith
2011-12-03 15:18 ` Alan Mackenzie
2011-12-03 16:19   ` Eli Zaretskii
2011-12-13 15:31   ` Kan-Ru Chen
2011-12-14 11:19     ` Alan Mackenzie
2011-12-14 11:30     ` Alan Mackenzie
2011-12-14 12:23       ` Alan Mackenzie
2011-12-14 13:14     ` Alan Mackenzie
2011-12-14 15:02       ` Kan-Ru Chen
2011-12-15 13:43     ` Alan Mackenzie
2011-12-15 16:16       ` Kan-Ru Chen
2011-12-15 18:12         ` Alan Mackenzie
2011-12-16  2:32           ` Kan-Ru Chen
2011-12-16 11:26             ` Alan Mackenzie
2011-12-17 16:06               ` Kan-Ru Chen
2011-12-21 10:56                 ` Alan Mackenzie
2011-12-21 13:33                   ` Geoff Gole
2011-12-21 16:04                     ` Alan Mackenzie
2011-12-21 16:48                       ` Geoff Gole
2011-12-21 18:06                         ` Alan Mackenzie
2011-12-21 18:16                     ` Eli Zaretskii
2011-12-21 18:32                       ` Geoff Gole
2011-12-21 19:35                         ` Eli Zaretskii
2011-12-23  1:56                     ` Kentaro NAKAZAWA
2011-12-23 12:03                       ` Alan Mackenzie
2012-01-06 22:08                       ` Alan Mackenzie
2012-01-07  0:09                         ` Kentaro NAKAZAWA
2012-01-07 13:50                           ` Alan Mackenzie
2012-01-08  1:26                             ` Kentaro NAKAZAWA
2012-01-08 10:05                               ` Alan Mackenzie
2012-01-20 17:26                               ` Alan Mackenzie
2012-02-06 16:14                                 ` Kentaro NAKAZAWA
2011-12-22 16:06                   ` Kan-Ru Chen
2012-01-13 19:12                 ` Alan Mackenzie
2012-01-14  9:12                   ` Kan-Ru Chen
2012-01-15 21:12                 ` Alan Mackenzie
2012-01-22  4:20                   ` Kan-Ru Chen
2011-12-03 21:15 ` Alan Mackenzie
2011-12-04  6:00   ` Eli Zaretskii

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.