all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Yuan Fu <casouri@gmail.com>
Cc: mwd@md5i.com, Eli Zaretskii <eliz@gnu.org>,
	stephen_leake@stephe-leake.org,
	Michael Welsh Duggan <mwd@cert.org>,
	emacs-devel@gnu.org
Subject: Re: emacs-tree-sitter and Emacs
Date: Thu, 02 Apr 2020 14:26:51 -0400	[thread overview]
Message-ID: <jwvtv21n424.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <82EC720F-CED9-45E6-813B-FD326A9E7651@gmail.com> (Yuan Fu's message of "Thu, 2 Apr 2020 14:17:22 -0400")

>> As mentioned in some other message, this design becomes inefficient when
>> you have two windows displaying a large buffer, one display near the end,
>> and the other near the beginning, and you make changes at the beginning
>> of the buffer.  I haven't seen any performance bug-reports or complaints
>> about it, so it appears that those circumstances are very rare.
> Or you open a buffer and jumps to point-max,

I don't think this case is handled inefficiently by the approach taken
by `syntax-propertize`: it will take some time, yes, but it's largely
unavoidable in general (it's the same time that tree-sitter's and
CC-mode's up-front full parse have to pay for).

> OTOH if the whole buffer has been parsed, this two-window setup
> shouldn’t be slow when making changes because incremental parsing is fast,
> and we don’t need to re-parse the whole buffer.

That's supposed to be true with tree-sitter and CC-mode, but with
`syntax-propertize` we reparse everything between the first and the
second window, even though most of it was likely left untouched and
parsed identically to last time.


        Stefan




  reply	other threads:[~2020-04-02 18:26 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-30  3:23 emacs-tree-sitter and Emacs Jorge Javier Araya Navarro
2020-03-30 13:07 ` Eli Zaretskii
2020-03-30 14:00   ` Stefan Monnier
2020-04-01  0:08     ` Stephen Leake
2020-04-01  0:27   ` Stephen Leake
2020-04-01 13:20     ` Eli Zaretskii
2020-04-01 19:51       ` Stephen Leake
2020-04-02 14:03         ` Eli Zaretskii
2020-04-02 14:27           ` Michael Welsh Duggan
2020-04-02 15:15             ` Eli Zaretskii
2020-04-02 15:24               ` Michael Welsh Duggan
2020-04-02 16:10                 ` Eli Zaretskii
2020-04-02 16:19                   ` Michael Welsh Duggan
2020-04-02 17:18                     ` Yuan Fu
2020-04-02 17:39                       ` Stefan Monnier
2020-04-02 18:17                         ` Yuan Fu
2020-04-02 18:26                           ` Stefan Monnier [this message]
2020-04-03  2:16                           ` Stephen Leake
2020-04-02 18:29                       ` Eli Zaretskii
2020-04-02 18:27                     ` Eli Zaretskii
2020-04-02 18:50                       ` Michael Welsh Duggan
2020-04-02 19:03                         ` Eli Zaretskii
2020-04-02 19:39                           ` 조성빈
2020-04-03  6:37                             ` Eli Zaretskii
2020-04-03 17:27                               ` Stephen Leake
2020-04-02 19:48                           ` Stefan Monnier
2020-04-03  2:06               ` Stephen Leake
2020-04-03  7:33                 ` Eli Zaretskii
2020-04-03 17:24                   ` Stephen Leake
2020-04-03 18:39                     ` Eli Zaretskii
2020-04-02 15:33             ` martin rudalics
2020-04-03  1:55           ` Stephen Leake
2020-04-03  4:47             ` Jorge Javier Araya Navarro
2020-04-03  7:32             ` Eli Zaretskii
2020-04-03 17:05               ` Stephen Leake
2020-04-03 18:19                 ` Eli Zaretskii
2020-04-04  0:00                   ` Stephen Leake
2020-04-01 13:28     ` Stefan Monnier
2020-03-30 14:11 ` Stefan Monnier
2020-03-30 17:00   ` Jorge Javier Araya Navarro
2020-03-30 17:07     ` Dmitry Gutov
2020-03-30 17:09       ` Jorge Javier Araya Navarro
2020-03-30 17:22     ` Stefan Monnier
2020-03-30 17:34       ` Jorge Javier Araya Navarro
2020-03-30 17:50       ` Stefan Monnier
2020-04-01  0:30       ` Stephen Leake

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jwvtv21n424.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=casouri@gmail.com \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=mwd@cert.org \
    --cc=mwd@md5i.com \
    --cc=stephen_leake@stephe-leake.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.