emacs-devel
[Top][All Lists]
Advanced

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

RE: Using incremental parsing in Emacs


From: arthur miller
Subject: RE: Using incremental parsing in Emacs
Date: Sun, 5 Jan 2020 19:23:16 +0000

I think there are two use-cases:

1) batch processing where entire file (or visible portion) is processed by different thread(s), for example on file opening or if some expansion takes place (yasnippet or similar).

This can be done by dividing text in number of blocks (lines or similar) and letting each thread match block atva time against shared pattern database. 

2) interactive use; when user is typing actively.
 
Interactive use is easy, just match ladt word after certain delimiters are typed. Probably does not need threading, but can't be done with multiple threads  as well. Multiple threads can match one word at a time against patterns database split in blocks. Case 2 is probably not worth the round-trip time to the bus, but I don't know.

Just as a thought. Would it be possible?

Skickat från min Samsung Galaxy-smartphone.



-------- Originalmeddelande --------
Från: Eli Zaretskii <address@hidden>
Datum: 2020-01-05 19:22 (GMT+01:00)
Till: Stefan Monnier <address@hidden>
Kopia: address@hidden, address@hidden
Ämne: Re: Using incremental parsing in Emacs

> From: Stefan Monnier <address@hidden>
> Cc: Eli Zaretskii <address@hidden>,  address@hidden
> Date: Sun, 05 Jan 2020 12:09:08 -0500
>
> I was more thinking about having the new system work concurrently
> with the rest of Elisp.  I.e. have one CPU run Elisp while other
> CPU(s) do the syntax processing,

How do you give the syntax-processing thread access to buffer text, if
it's running asynchronously?


reply via email to

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