all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Yuan Fu <casouri@gmail.com>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: emacs-devel@gnu.org
Subject: Re: treesitter local parser: huge slowdown and memory usage in a long file
Date: Mon, 27 May 2024 15:05:22 -0700	[thread overview]
Message-ID: <13F12132-4E95-43A8-BC24-0C7187426DAF@gmail.com> (raw)
In-Reply-To: <jwv1q5p9pb7.fsf-monnier+emacs@gnu.org>



> On May 25, 2024, at 9:23 PM, Stefan Monnier via Emacs development discussions. <emacs-devel@gnu.org> wrote:
> 
>> The only problem is to decide how long a history of updated ranges do we
>> keep for each parser. The 100% correct approach is to maintain a separate
>> history for each consumer, and never throw away old ranges until the
>> consumer consumes them. But then you risk wasting memory if some consumer
>> never consumes the ranges. To handle that we can add a hard limit. But then
>> this hard limit might be too low for some edge case… We can make this hard
>> limit configurable, and if we ever encountered a case where this hard limit
>> is not enough and there’s no way around it (unlikely), we can instruct users
>> or lisp program to increase it.
> 
> Side note: the above is fairly close to describing `track-changes.el`.
> [ where I don't have any hard limit, currently.  ]
> 

I see. I suppose you had to shift “modified region” around according to later edits, right?

Yuan


  reply	other threads:[~2024-05-27 22:05 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-20  2:18 treesitter local parser: huge slowdown and memory usage in a long file Yuan Fu
2024-04-20 19:14 ` Vincenzo Pupillo
2024-04-23  5:09   ` Yuan Fu
2024-05-06  2:04 ` Dmitry Gutov
2024-05-09  0:16   ` Yuan Fu
2024-05-12 23:44     ` Dmitry Gutov
2024-05-22  5:51       ` Yuan Fu
2024-05-22 23:42         ` Dmitry Gutov
2024-05-27 22:03           ` Yuan Fu
2024-05-27 22:24             ` Dmitry Gutov
2024-06-04  4:53               ` Yuan Fu
2024-06-04  8:19                 ` Vincenzo Pupillo
2024-06-04 15:01                   ` Eli Zaretskii
2024-06-04 20:44                     ` Vincenzo Pupillo
2024-06-06 23:59                 ` Dmitry Gutov
2024-06-07  0:13                   ` Dmitry Gutov
2024-06-11 16:36                     ` Yuan Fu
2024-05-26  4:23     ` Stefan Monnier via Emacs development discussions.
2024-05-27 22:05       ` Yuan Fu [this message]
2024-05-27 22:34         ` Stefan Monnier
  -- strict thread matches above, loose matches on Subject: below --
2024-02-11 21:53 Vincenzo Pupillo
2024-02-12  4:16 ` Yuan Fu
2024-02-12 14:09   ` Eli Zaretskii
2024-02-13  8:15     ` Yuan Fu
2024-02-13  9:39       ` Vincenzo Pupillo
2024-02-13 12:59       ` Eli Zaretskii
2024-02-13  0:50   ` Dmitry Gutov
2024-02-13  8:08     ` Yuan Fu
2024-02-18  3:37       ` Dmitry Gutov
2024-02-19  5:53         ` Yuan Fu
2024-03-21  6:39           ` Yuan Fu

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=13F12132-4E95-43A8-BC24-0C7187426DAF@gmail.com \
    --to=casouri@gmail.com \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /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.