From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Winston Newsgroups: gmane.emacs.help Subject: 25.3 => 26.1, C-mode, slow again Date: Sat, 04 Aug 2018 17:36:45 -0400 Organization: Aioe.org NNTP Server Message-ID: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1533418703 26169 195.159.176.226 (4 Aug 2018 21:38:23 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 4 Aug 2018 21:38:23 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (berkeley-unix) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Aug 04 23:38:19 2018 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fm4Fd-0006iz-Ek for geh-help-gnu-emacs@m.gmane.org; Sat, 04 Aug 2018 23:38:17 +0200 Original-Received: from localhost ([::1]:56376 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fm4Hj-0003C5-T8 for geh-help-gnu-emacs@m.gmane.org; Sat, 04 Aug 2018 17:40:27 -0400 Original-Path: usenet.stanford.edu!goblin2!goblin.stu.neva.ru!aioe.org!.POSTED!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 48 Original-NNTP-Posting-Host: HiP9CM4zZKmgWNAsVK99/w.user.gioia.aioe.org Original-X-Complaints-To: abuse@aioe.org Cancel-Lock: sha1:nAVPP7qNgwf2HTNFoL3s059WDEY= X-Notice: Filtered by postfilter v. 0.8.3 Mail-Copies-To: never Original-Xref: usenet.stanford.edu gnu.emacs.help:223510 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:117635 Archived-At: 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