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: Fri, 28 Sep 2018 19:03:41 -0400 Message-ID: References: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1538175752 23848 195.159.176.226 (28 Sep 2018 23:02:32 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 28 Sep 2018 23:02:32 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Sep 29 01:02:28 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 1g61mE-00066E-E0 for ged-emacs-devel@m.gmane.org; Sat, 29 Sep 2018 01:02:26 +0200 Original-Received: from localhost ([::1]:47887 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g61oJ-0001ES-9n for ged-emacs-devel@m.gmane.org; Fri, 28 Sep 2018 19:04:35 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:37793) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g61nh-0001EL-Df for emacs-devel@gnu.org; Fri, 28 Sep 2018 19:03:58 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g61nb-0004SL-Qr for emacs-devel@gnu.org; Fri, 28 Sep 2018 19:03:56 -0400 Original-Received: from [195.159.176.226] (port=41748 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1g61nb-0004R3-Hw for emacs-devel@gnu.org; Fri, 28 Sep 2018 19:03:51 -0400 Original-Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1g61lQ-0005AQ-9L for emacs-devel@gnu.org; Sat, 29 Sep 2018 01:01:36 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 24 Original-X-Complaints-To: usenet@blaine.gmane.org Cancel-Lock: sha1:CSfTeG8s+6Shwyt2/DKWBsw50+s= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 195.159.176.226 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:230124 Archived-At: > I want to raise this topic regarding the rise of Language servers and > the performance problems that are related to parsing process output on > UI thread. I'm not necessarily surprised that there are performance problems there, but I'm not actually familiar with them. Could you point to concrete examples, bug reports, and things like that? Ideally, has someone investigated to see exactly where/when the performance problems show up? > I am not familiar with Emacs internals and I am not sure whether this > is doable but I wonder whether providing the option to do the > parsing(and probably more?) in a separate thread and then call the > *filter* function on emacs side in UI thread with elisp data > structures like lists, hashmaps etc. instead of raw string is feasible > which would be similar to what is happening in Javascript world. It shouldn't be too hard to use a separate (OS-level) Emacs *process* if you want to do the parsing without blocking the normal UI thread. But it comes with other performance tradeoffs. Stefan