unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: yyoncho <yyoncho@gmail.com>
To: monnier@iro.umontreal.ca, eliz@gnu.org
Cc: emacs-devel@gnu.org
Subject: Re: Running process filters in another thread
Date: Sun, 30 Sep 2018 18:01:53 +0300	[thread overview]
Message-ID: <CACCVLQWm+-ic6w1P5WucG=xCgXUf74hFw_bfFeYu=7382ZeZWw@mail.gmail.com> (raw)
In-Reply-To: <jwvh8i7jg6d.fsf-monnier+emacs@gnu.org>

[-- Attachment #1: Type: text/plain, Size: 1627 bytes --]

Hi Stefan,

> If we really use all of the data, then I can't see how processing the
> bytes and parsing them can be the dominating factor,

There are a lot of requests that are handled by updating some map(e. g.
received diagnostics
for buffer X) and the data is not used right away and the parsing is the
dominating factor.
This makes me think that we can span subprocess and use it as a store. I
will have to do some
benchmarking of communication between emacs and subprocess.

> No, you could have the subprocess send a parsed JSON object, I think.
@eliz@gnu.org <eliz@gnu.org> can you elaborate on that are you referring to
what emacs-async
(https://github.com/jwiegley/emacs-async) is doing?

Thanks,
Ivan

On Sun, Sep 30, 2018 at 4:01 PM Stefan Monnier <monnier@iro.umontreal.ca>
wrote:

> >> So, IIUC the scenario is that the LSP sends us large JSON data
> >> structures, but we only ever use a fairly small portion of it, so
> >> presumably a significant part of the total processing time is spent
> >> gobbling data and parsing it into an internal data structure.
> >
> > AFAIK this is not the case, LSP is pretty minimal. This could be true
> > for some limited cases but in general we need all of the data.
>
> If we really use all of the data, then I can't see how processing the
> bytes and parsing them can be the dominating factor, so
> a `start-json-process` wouldn't make any significant difference.
>
> But at least in your example of semantic highlight we definitely don't
> have to use all of the data, but only the portion relevant for the
> currently displayed parts of the buffer.
>
>
>         Stefan
>

[-- Attachment #2: Type: text/html, Size: 2356 bytes --]

  reply	other threads:[~2018-09-30 15:01 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
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 [this message]
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='CACCVLQWm+-ic6w1P5WucG=xCgXUf74hFw_bfFeYu=7382ZeZWw@mail.gmail.com' \
    --to=yyoncho@gmail.com \
    --cc=eliz@gnu.org \
    --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 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).