From: Eli Zaretskii <eliz@gnu.org>
To: yyoncho <yyoncho@gmail.com>
Cc: emacs-devel@gnu.org
Subject: Re: Fwd: Running process filters in another thread
Date: Sat, 29 Sep 2018 10:37:33 +0300 [thread overview]
Message-ID: <83va6o69fm.fsf@gnu.org> (raw)
In-Reply-To: <CACCVLQUQc3gXwtaxpE05T-VZOjX1JSibFeqN+8K+uC2=B2JKkw@mail.gmail.com> (message from yyoncho on Sat, 29 Sep 2018 09:54:30 +0300)
> From: yyoncho <yyoncho@gmail.com>
> Date: Sat, 29 Sep 2018 09:54:30 +0300
>
> Excuse me if I am talking nonsense - my understanding is that there are Emacs threads(the threads that are
> available using elisp code) which run cooperatively and there are OS level threads which for example read the
> output of a process and then pass it to the filter function as a string and they might run in parallel and I was
> talking about running the pre-filter function into such thread.
Emacs reads output from subprocesses in its "normal" Lisp thread(s).
No special threads are involved.
> If this is not the case, I guess it won't be easy to spawn new os thread and run eventually *pure* function to
> process the output?
This should be possible, but I think we wouldn't like doing that, as
running async threads that need to feed the main thread is tricky, and
doesn't really go well with the architecture of Emacs.
> Alternatively, I was thinking about creating some faster emacs specific binary serialization/deserialization of
> data structures so elisp programmers could move the parsing into separate emacs instance(ala
> https://github.com/jwiegley/emacs-async) and then consume the output.
Something like that, yes. But I think we should first understand well
what part(s) of the LSP processing takes most CPU cycles, and then
discuss how best to integrate that into Emacs. It could be, for
example, that implementing some portions of that in C will provide new
primitives that would allow to slash the processing time without
complicating the architecture.
next prev parent reply other threads:[~2018-09-29 7:37 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-28 18:21 Running process filters in another thread yyoncho
2018-09-28 21:14 ` Eli Zaretskii
[not found] ` <CACCVLQUrpxuhKwaHbFfCSzYLfucL8x+tJOkwgKwK8bzb0VZaWg@mail.gmail.com>
2018-09-29 6:54 ` Fwd: " yyoncho
2018-09-29 7:37 ` Eli Zaretskii [this message]
2018-09-28 23:03 ` Stefan Monnier
2018-09-29 7:35 ` yyoncho
2018-09-29 8:15 ` Eli Zaretskii
2018-09-29 18:10 ` Stefan Monnier
2018-09-29 19:23 ` yyoncho
2018-09-29 20:30 ` Stefan Monnier
2018-09-30 7:08 ` yyoncho
2018-09-30 13:01 ` Stefan Monnier
2018-09-30 15:01 ` yyoncho
2018-10-01 21:12 ` Tom Tromey
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=83va6o69fm.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=emacs-devel@gnu.org \
--cc=yyoncho@gmail.com \
/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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).