emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Reliable after-change-functions (via: Using incremental parsing in E


From: Dmitry Gutov
Subject: Re: Reliable after-change-functions (via: Using incremental parsing in Emacs)
Date: Wed, 1 Apr 2020 06:49:45 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1

On 01.04.2020 05:28, Eli Zaretskii wrote:
Cc: address@hidden, address@hidden, address@hidden,
  address@hidden
From: Dmitry Gutov <address@hidden>
Date: Tue, 31 Mar 2020 22:50:43 +0300

(benchmark 1 '(progn (find-file "src/xdisp.c") (goto-char (point-max))))

=> Elapsed time: 1.940401s (0.376140s in 6 GCs)
This doesn't measure the redisplay (which happens after the above
command returns).

Which means that the current state of affairs is even slower.

No, it means that whatever delay we will have with parsing the entire
buffer is _in_addition_ to whatever you measured.

Probably not. IIUC, most of this 1.2 measured delay is CC Mode doing the preliminary parsing. That phase would be replaced by TreeSitter's full buffer parse, which supposedly takes a comparable amount of time.

The redisplay phase will most likely be faster because by then the correct AST is available, and computing highlighting based on it is supposedly something that TreeSitter does quickly and well.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]