From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Running process filters in another thread Date: Sun, 30 Sep 2018 09:01:52 -0400 Message-ID: References: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1538312448 20197 195.159.176.226 (30 Sep 2018 13:00:48 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 30 Sep 2018 13:00:48 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: emacs-devel@gnu.org To: yyoncho Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Sep 30 15:00:44 2018 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g6bL1-0005BP-PW for ged-emacs-devel@m.gmane.org; Sun, 30 Sep 2018 15:00:43 +0200 Original-Received: from localhost ([::1]:55354 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g6bN8-0007Rw-Gz for ged-emacs-devel@m.gmane.org; Sun, 30 Sep 2018 09:02:54 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:59356) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g6bMH-0007Re-Ae for emacs-devel@gnu.org; Sun, 30 Sep 2018 09:02:02 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g6bMC-0005vV-0z for emacs-devel@gnu.org; Sun, 30 Sep 2018 09:02:01 -0400 Original-Received: from chene.dit.umontreal.ca ([132.204.246.20]:38350) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g6bMB-0005u2-Q8 for emacs-devel@gnu.org; Sun, 30 Sep 2018 09:01:55 -0400 Original-Received: from ceviche.home (lechon.iro.umontreal.ca [132.204.27.242]) by chene.dit.umontreal.ca (8.14.7/8.14.1) with ESMTP id w8UD1qQm002461; Sun, 30 Sep 2018 09:01:52 -0400 Original-Received: by ceviche.home (Postfix, from userid 20848) id 2A6E56610C; Sun, 30 Sep 2018 09:01:52 -0400 (EDT) In-Reply-To: (yyoncho@gmail.com's message of "Sun, 30 Sep 2018 10:08:06 +0300") X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 2 Rules triggered EDT_SA_DN_PASS=0, RV6384=0 X-NAI-Spam-Version: 2.3.0.9418 : core <6384> : inlines <6908> : streams <1799952> : uri <2721091> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 132.204.246.20 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:230168 Archived-At: >> 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