From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: arthur miller Newsgroups: gmane.emacs.devel Subject: Re: Using incremental parsing in Emacs Date: Sat, 4 Jan 2020 14:05:30 +0000 Message-ID: References: <83blrkj1o1.fsf@gnu.org> <86zhf4gwhl.fsf@stephe-leake.org> <83tv5cgvar.fsf@gnu.org> <86v9psgkqe.fsf@stephe-leake.org> <83mub3hao7.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="206794"; mail-complaints-to="usenet@blaine.gmane.org" Cc: Stephen Leake , "emacs-devel@gnu.org" To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Jan 04 15:06:22 2020 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1ink4L-000reF-5k for ged-emacs-devel@m.gmane.org; Sat, 04 Jan 2020 15:06:21 +0100 Original-Received: from localhost ([::1]:34258 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ink4K-0007el-1V for ged-emacs-devel@m.gmane.org; Sat, 04 Jan 2020 09:06:20 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:34986) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ink3c-00073H-BM for emacs-devel@gnu.org; Sat, 04 Jan 2020 09:05:38 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ink3a-0001YF-6z for emacs-devel@gnu.org; Sat, 04 Jan 2020 09:05:35 -0500 Original-Received: from mail-oln040092064106.outbound.protection.outlook.com ([40.92.64.106]:31429 helo=EUR01-DB5-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ink3Z-0001RL-6Y; Sat, 04 Jan 2020 09:05:34 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=U3B/fEZR8fkQIPOqilOrbotxUrtkyJ0Sme5WNNBMYkorVJJll2VXa+g3B3hH2Lc5BL0ajycXdToN3HJtKg7x3l4nuHFqrd+2RJRKsN6r5yQgAkUS33pCtmTzaj5wrRMBHvU5LIsz9LIK5DX0B2ky0ofizMPio6ZaAOrW2QN+zoaYIv+A7/t2uoEZyBmouh1FIGsF0ENBo6cLJWuXkIn/0ucHJ6SGu/plJDVkt5CY0h1iKhCcBbkMWUQbXPIw5KM4nAjorZ0gD3dNVzxfnwDmCZvFohzhQXFfbXD09vLMBc0AazPhZ2EZlXzKJIcUlpT68ZjHMgt71wNJzD1wFOxELA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=KzhyEQPJSbGAbYYY35J9V9Diw1OZf+hC9wEoZnKEtt8=; b=oEjEYbFUZkxl2dNSo+mxlsv60XFueFyzOhvq330kiVRGGFzxdxOhbEn5i8qw3qtlBQ8SJF8qkSOCaQdu+We6cIOe7riLN04HyElLMo/tAkRVIMMtidxbBoGpSXAfVBiUcbSr32oPoNPi+tHvUhYx5xhM/ZQIN+6bmk5zc+YmDL2dVYl5Zhv/f69+CMz/d8c6wvqaWOWvjez0spArdgU/6xLtioBDQPhD1CZnYr06U5lru0OQv8ru/Zc8S8AavYXbGywx+Wl1pSyzARmeKczeEuCsgAcpLuBEDu1PYcN+G/K4kT8WKZAlXZoidfdMob5qRtU3DbwZog8cFSPHjQ3hrw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=live.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=KzhyEQPJSbGAbYYY35J9V9Diw1OZf+hC9wEoZnKEtt8=; b=ZWtLX9U5ygTmY3L4xkqeTfSBtZScvPT9fi1yauc6tEQTx8o2uQ+VhB4nmLaN+BL+ZRoRcpoQQ7j0p8nCCr1axXb88xvy3AXzX0ZIxsUYisFCBZ9vjQpthcuCEXJzhwMtYh9n/B2FdDGjQ08xDFJbZhkU02mB1NOzqJtnmTctbTsoU+5riUzROM+mQy8RoKaanH1lo+zjYSPunoTiFtiTUI6zHM3cSA6DWJRQQV/yfvYP2pOE6cGMNFexkXOj86F8Ucm1nwIKaMfEsInRchkJfNv9Hu5zQBinXocwuA9ACdIz+EQxoK41DXRqng5ebCUcvCnW2pXSQ2ns9oDO/ZyAKQ== Original-Received: from DB5EUR01FT003.eop-EUR01.prod.protection.outlook.com (10.152.4.52) by DB5EUR01HT111.eop-EUR01.prod.protection.outlook.com (10.152.5.146) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2602.11; Sat, 4 Jan 2020 14:05:30 +0000 Original-Received: from VI1P194MB0429.EURP194.PROD.OUTLOOK.COM (10.152.4.55) by DB5EUR01FT003.mail.protection.outlook.com (10.152.4.101) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2602.11 via Frontend Transport; Sat, 4 Jan 2020 14:05:30 +0000 Original-Received: from VI1P194MB0429.EURP194.PROD.OUTLOOK.COM ([fe80::35f2:9ea2:efd6:1d46]) by VI1P194MB0429.EURP194.PROD.OUTLOOK.COM ([fe80::35f2:9ea2:efd6:1d46%5]) with mapi id 15.20.2602.015; Sat, 4 Jan 2020 14:05:30 +0000 Original-Received: from pascal.homepc (90.230.29.56) by AM6PR0202CA0052.eurprd02.prod.outlook.com (2603:10a6:20b:3a::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2602.10 via Frontend Transport; Sat, 4 Jan 2020 14:05:29 +0000 Thread-Topic: Using incremental parsing in Emacs Thread-Index: AQHVwh1Uy8tVxqoXLEaWXDDoUSKGMA== In-Reply-To: <83mub3hao7.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 04 Jan 2020 10:45:44 +0200") Accept-Language: sv-SE, en-US Content-Language: en-US x-clientproxiedby: AM6PR0202CA0052.eurprd02.prod.outlook.com (2603:10a6:20b:3a::29) To VI1P194MB0429.EURP194.PROD.OUTLOOK.COM (2603:10a6:803:41::33) x-incomingtopheadermarker: OriginalChecksum:4007BC111F73DD8FCF3E14A9A7080F05066DCBD8AD5BFD404415F533C95B79A7; UpperCasedChecksum:CE7E1CDD77884A05DCA86DE9CA2C83253AE41BAC1E00E350CF3F5CF0E1951788; SizeAsReceived:7670; Count:50 x-ms-exchange-messagesentrepresentingtype: 1 x-tmn: [4npGtIzXYcfr9NiZuuE/ipAstMSPoAV2] x-microsoft-original-message-id: <87sgkvmi57.fsf@live.com> x-ms-publictraffictype: Email x-incomingheadercount: 50 x-eopattributedmessage: 0 x-ms-office365-filtering-correlation-id: a1325653-91ce-46a5-00a4-08d7911f2832 x-ms-traffictypediagnostic: DB5EUR01HT111: x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: +473wBwEQodw/zbhCi4V7dcV/13SqPvK/AOzJUtjxkKjnkFKXfuRAf7MUmWcAiyUjIm9Et47bWyL1Ve0kzEuDlJl0ZoyWV5gKTuh3PyZ/bD4qMerP3w8WVNOAbaHFRbrIwxUrmXhhYpZZZ+DHK/n43SvgFz6pyLlFAoMTtt6RSsPXUEEWCywjOotidt7VFix x-ms-exchange-transport-forked: True X-OriginatorOrg: live.com X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-CrossTenant-Network-Message-Id: a1325653-91ce-46a5-00a4-08d7911f2832 X-MS-Exchange-CrossTenant-rms-persistedconsumerorg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-CrossTenant-originalarrivaltime: 04 Jan 2020 14:05:30.4681 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Internet X-MS-Exchange-CrossTenant-id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB5EUR01HT111 X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 [fuzzy] X-Received-From: 40.92.64.106 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 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:243921 Archived-At: Eli Zaretskii writes: >> From: Stephen Leake >> Date: Fri, 03 Jan 2020 15:53:45 -0800 >>=20 >> The interface should look like LSP; it aims to support everything an IDE >> needs from a "language server" (ie parser), and allows for custom >> extensions where it falls short. > > Maybe I'm the odd one out, but I don't think I have a clear idea of > what the "LSP interface" entails. Would you (or someone else) post a > summary, or point to some place where this is described succinctly > enough to not require a long study? > > We did learn one important thing from using LSP servers: that > processing the JSON stuff back and forth adds non-trivial overhead and > slows down the application enough to annoy users, even after we did > all we can to speed up the translation. So I think it makes sense to > take one more look at the issue and see if we can come up with better > interfaces, which will suit Emacs applications better and allow faster > processing. Using a library that processes stuff locally would then > allow us to implement such interfaces more easily, since we will be > free from the restrictions imposed by the need to communicate with > external processes. Personally I dislike the idea that they used json at all, but lots of tools work now with that json. Maybe the slowness comes from the overhead to communicate that json? Could it help if Emacs provided a way to put those json files into a shared memory so that both server and client can use same file without sending it over between processes and having two copies of both source and analysis in RAM. Maybe server could use Emacs buffer directly instead of sending source file to external process. But yes generally I also think that json is horrible format as interchange format but I can understand why MS choosed it for their tool.