[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
25.3 => 26.1, C-mode, slow again
From: |
Winston |
Subject: |
25.3 => 26.1, C-mode, slow again |
Date: |
Sat, 04 Aug 2018 17:36:45 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.1 (berkeley-unix) |
Summary: I'm looking for the (possibly renamed in Emacs 26) variable
that controls how much effort to go to (incl. how far to look
back) in C-mode to determine the syntax of what's visible
on-screen.
Details:
I recently upgraded from Emacs 25.3 (where everything was working well)
to 26.1, and an old problem of slowness has come back again.
The case where it's most apparent is in c-mode, in an initialized static
array containing tens of thousands entries, with several values per
entry / line, some values numeric and some string. Simple incremental
searches that were nearly instantaneous in 25.3 now take 4-8 seconds.
Simple edits (kill line, yank line, kill word, type new word in a
string, undo) that also were instantaneous in 25.3 now sometimes take
10-40 seconds.
This problem first appeared several years ago with an earlier Emacs
upgrade (23 => 24?). I don't recall the name of the variable I had to
change to fix it back then, and nothing in my .emacs file catches my eye
as being it. Maybe font-lock-maximum-decoration? (but I'm thinking
not).
What I do recall is that the variable had 3 states:
#1: (probably t) (the default) Do however much work is needed to
determine the correct C syntax for the code on-screen, and the
correct indentation for the indent line function;
#2: (probably nil) disable the feature;
and #3: (might have been any value other than t or nil) Limit the effort
spent to determine the syntax and indentation, and just look at other
code in the vicinity.
Back then, the default setting was very slow, just like what I'm seeing
now. I remember doing something to switch to mode 3: the slowness
vanished, and it did the right thing ~99% of the time [once in a while
in a long C function, c-indent-line would get the indentation wrong].
Anyone know what the variable's (possibly changed) name is, or otherwise
how to fix the slowness? The difference between an Emacs that takes 3-4
seconds not only to echo each change but also even just to scroll
forward or backward a screenful, versus an Emacs that responds
instantly, is huge (to me).
Thanks in advance,
-WBE
- 25.3 => 26.1, C-mode, slow again,
Winston <=