From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: HaiJun Zhang Newsgroups: gmane.emacs.bugs Subject: bug#38807: [Feature request]: Support lisp workers like web workers. Date: Thu, 26 Mar 2020 21:49:08 +0800 Message-ID: References: <83o8vpn8g1.fsf@gnu.org> <87mub9u0ld.fsf@gmx.de> <831rslmxih.fsf@gnu.org> <83lfqslafm.fsf@gnu.org> <83r20jjgg3.fsf@gnu.org> <83png1hyb8.fsf@gnu.org> <83imlrh9ze.fsf@gnu.org> <83d096dswz.fsf@gnu.org> <83lfnscvfi.fsf@gnu.org> <87ftdwmlj7.fsf@gmail.com> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="5e7cb2d9_34dfbc00_6dce" Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="54655"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 38807@debbugs.gnu.org, michael.albinus@gmx.de To: Ivan Yonchovski Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Mar 26 14:50:17 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jHStl-000E6f-Cw for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 26 Mar 2020 14:50:17 +0100 Original-Received: from localhost ([::1]:52158 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jHStk-00011S-6v for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 26 Mar 2020 09:50:16 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:59350) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jHStY-00011M-Cn for bug-gnu-emacs@gnu.org; Thu, 26 Mar 2020 09:50:05 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jHStV-0005IC-VD for bug-gnu-emacs@gnu.org; Thu, 26 Mar 2020 09:50:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:52296) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jHStV-0005I3-RX for bug-gnu-emacs@gnu.org; Thu, 26 Mar 2020 09:50:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jHStV-00045r-PB for bug-gnu-emacs@gnu.org; Thu, 26 Mar 2020 09:50:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: HaiJun Zhang Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 26 Mar 2020 13:50:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 38807 X-GNU-PR-Package: emacs Original-Received: via spool by 38807-submit@debbugs.gnu.org id=B38807.158523057015677 (code B ref 38807); Thu, 26 Mar 2020 13:50:01 +0000 Original-Received: (at 38807) by debbugs.gnu.org; 26 Mar 2020 13:49:30 +0000 Original-Received: from localhost ([127.0.0.1]:58269 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jHSsz-00044n-Hc for submit@debbugs.gnu.org; Thu, 26 Mar 2020 09:49:29 -0400 Original-Received: from mail-oln040092254035.outbound.protection.outlook.com ([40.92.254.35]:14547 helo=APC01-PU1-obe.outbound.protection.outlook.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jHSsx-00044X-MP for 38807@debbugs.gnu.org; Thu, 26 Mar 2020 09:49:28 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Zit9zBmrlZWHBCUl1aUAiavoNpTWkAxQMNfvFhBlSFWJFx1yzWdsMDHKG8SJcgEs3N8YFeSBwvMOLNNDsd0d7hwr7f72Jfmgm6WbW1dY04O0ohLD01RxJkqmqposWYxOqTNP+AxAN2Cv2Jy/NPin5oTk6sJUM6mJ9dXlFvZjBrmnPJZet0dcqL3uceAmWnupC6FD8KrXUin/rCtehRviVt0+lYI3OnP3HQSPJJHlS4g4/vvuB9z9Nl3eHWXQRSDo2f0QXeIj6n5BrkDYRILanUx4yKClVaaWURyT2ebJ8wc3d7N1a+xlWqS5WOVQnPUM1JZ1BULFrYdrINC/DzKwUQ== 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=ukAUicN9YlUpD96eGt6zT1zXE1Zhd7CclKYMJqhOkos=; b=m0NLCI8BOEma4SKIwBRrzEil3ywxfOaRlNkcKk5XthgW0dBx6MLmxe90wYGsXcDs+otBfQ80lveMvNXDZ46t9cb9pNO2oxQWTkQsScLyGwPfvEqtyHbi/SsDSHnori1T+N8ZTVIIoVz0qezlq7lb2Mqm5aICPyuet+LMJ4hwl9U4AiF7J/gWy6RoguWSC3TGotnOjZETXqWhJuP9LkIxZ3Wg9T5zWOa/HteOhhNz++VACS86jf5y8aO9qgLVar0XldWVS+Aeqh1e9PfHDr4lfCADQ3h0AusZ3ZtlygtmzrAsiWXI+bpSULBAuvIgw4QD0BFa0ziY8sKA4srBSi7xHA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=outlook.com; dmarc=pass action=none header.from=outlook.com; dkim=pass header.d=outlook.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outlook.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ukAUicN9YlUpD96eGt6zT1zXE1Zhd7CclKYMJqhOkos=; b=u4zuSBIqemmgX217Q1IdXbB0mxE8mYLUzrRgSBkELKW+XzYMvRNpbUMRY/SHODs+ebwWW+10WiqdAM/jeh9Vgu0oZ18KrDR66Zq3NVFNO/sHIbVBHkmlAlzkrNyUSmTVOa3GETarZGs+KrNM9q4t0MY97YcuHX6hFj37tRA9AXYRLbseAEAFmy3wChPCXHJh0vXvThtzTdbkcvRsZ0JPjVlIQ8TH+h+E2rZwJ/fP+hXMff/KbojUVwsZ8r0FSjOtcI/Pd7Owm62LGZ8GwgvNQVA8EFw8guTiaZiYQUNKrUnaq2y0epq2/p7qsvjnQ0jt4lLmdo/21QS7Pq7haXHuJg== Original-Received: from HK2APC01FT034.eop-APC01.prod.protection.outlook.com (2a01:111:e400:7ebc::4f) by HK2APC01HT115.eop-APC01.prod.protection.outlook.com (2a01:111:e400:7ebc::272) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2856.17; Thu, 26 Mar 2020 13:49:19 +0000 Original-Received: from PS1PR03MB3606.apcprd03.prod.outlook.com (10.152.248.58) by HK2APC01FT034.mail.protection.outlook.com (10.152.248.191) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2814.13 via Frontend Transport; Thu, 26 Mar 2020 13:49:19 +0000 X-IncomingTopHeaderMarker: OriginalChecksum:01E3214392DD6F83ACFAE5FBBEE52197A280B0DA6F5C3310F788586D302DFFB3; UpperCasedChecksum:4D6CBA249DDB655668E247BF0588ACC45FEBBB79B8B221F8BA5CF1A36D2C74BF; SizeAsReceived:9741; Count:49 Original-Received: from PS1PR03MB3606.apcprd03.prod.outlook.com ([fe80::85cb:c430:1173:7716]) by PS1PR03MB3606.apcprd03.prod.outlook.com ([fe80::85cb:c430:1173:7716%5]) with mapi id 15.20.2856.019; Thu, 26 Mar 2020 13:49:19 +0000 In-Reply-To: <87ftdwmlj7.fsf@gmail.com> X-Readdle-Message-ID: 522a244b-7c1e-4b09-afce-5599ae869eb7@Spark X-ClientProxiedBy: HK2PR02CA0140.apcprd02.prod.outlook.com (2603:1096:202:16::24) To PS1PR03MB3606.apcprd03.prod.outlook.com (2603:1096:803:4e::17) X-Microsoft-Original-Message-ID: <522a244b-7c1e-4b09-afce-5599ae869eb7@Spark> X-MS-Exchange-MessageSentRepresentingType: 1 Original-Received: from [192.168.1.150] (1.196.184.123) by HK2PR02CA0140.apcprd02.prod.outlook.com (2603:1096:202:16::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2856.19 via Frontend Transport; Thu, 26 Mar 2020 13:49:18 +0000 X-Readdle-Message-ID: 522a244b-7c1e-4b09-afce-5599ae869eb7@Spark X-Microsoft-Original-Message-ID: <522a244b-7c1e-4b09-afce-5599ae869eb7@Spark> X-TMN: [cyQ1wKoyRm5cMGfpWx0cuFUyc0ohNYCV] X-MS-PublicTrafficType: Email X-IncomingHeaderCount: 49 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-Correlation-Id: 82607ec5-c366-46fc-9de7-08d7d18c7b6a X-MS-TrafficTypeDiagnostic: HK2APC01HT115: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: WpZf30Gpe4NUadIMPDBcHWdwk8ozdqOV5vlzLRmH96+0g8EGtzO0ZtWG7G3x4Lv/JC7kzBiQjhm6sxcbFlYJn1kNz92dc1qzyY/omAX1WhMmhHHVglMLWY0jZMVpuxTukpUfYDquoIBjhgvgvwTntMsywrZ7so2u4Kq9YOeEWprY+AHE2k2A0cdOlqOjT5AF2Gw0+VEW2m/FzWAlJ0Qk8SxsZJcBG49ZGXjFzK/0AsY= X-MS-Exchange-AntiSpam-MessageData: gHZ9B6EttZlkUGhTivfC7CGySFLqc32fnc9U8BcdCiI0oqqefJdPbTa1lnRX0XOC2u/9fo/HY9EA3LUfgzo/3w+GyFsabBzsUIKQGk253YH6MlJGwIycBiQx8rzbkLXBLRsu9qx/uGznjaXGqJLqzw== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 82607ec5-c366-46fc-9de7-08d7d18c7b6a X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Mar 2020 13:49:19.4734 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-FromEntityHeader: Internet X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: HK2APC01HT115 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:177741 Archived-At: --5e7cb2d9_34dfbc00_6dce Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline =E5=9C=A8 2020=E5=B9=B43=E6=9C=8826=E6=97=A5 +0800 AM12:44=EF=BC=8CIvan Y= onchovski =EF=BC=8C=E5=86=99=E9=81=93=EF=BC=9A > > HaiJun Zhang writes: > > > > > If json messages are parsed in module thread and saved as c struc= t data(not lisp data), they have to be > > > > translated to lisp data before emacs use. The translation which s= hould be done in emacs thread cost too > > > > much cpu, which make the parallel parsing of json messages not ve= ry useful. > > > > > > You are saying that the translation is costly, but did someone > > > actually measure that and verify that it's indeed costly=3F And if > > > someone did, where can I see the results in sufficient level of det= ail > > > to understand what part(s) of parsing JSON are the bottleneck=3F > > > > > > > I have talked with the author of lsp-mode. I think their team have do= ne some work on this. > > =40yyoncho Can you join the discussion=3F > > IIRC the bottleneck was the utf conversions (there was similar issue in= > native json parsing as well). I havent tested the dynamic module parser= > after the latest optimizations. Back then I tested also with the > conversion code disabled and it still was relatively slow compared to > the native json parsing even before the native joson parsing fixes. > > HaiJun Zhang, it will be good if you can report the performance issues > you have with lsp-mode. You may follow the guide in the > https://github.com/emacs-lsp/lsp-mode=23performance . > > > Thanks, > Ivan OK. I will do it when I have time. --5e7cb2d9_34dfbc00_6dce Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline
=E5=9C=A8 2020=E5=B9=B43=E6=9C=8826=E6=97= =A5 +0800 AM12:44=EF=BC=8CIvan Yonchovski <yyoncho@gmail.com>=EF= =BC=8C=E5=86=99=E9=81=93=EF=BC=9A

HaiJun Zhang writes:

If json messages are p= arsed in module thread and saved as c struct data(not lisp data), they have= to be
translated to lisp data before emacs use. The translation which should be d= one in emacs thread cost too
much cpu, which make the parallel parsing of json messages not very useful.=

You are saying that the translation is costly, but did someone
actually measure that and verify that it's indeed costly? And if
someone did, where can I see the results in sufficient level of detail
to understand what part(s) of parsing JSON are the bottleneck?


I have talked with the author of lsp-mode. I think their team have done som= e work on this.
@yyoncho Can you join the discussion?

IIRC the bottleneck was the utf conversions (there was similar issue in
native json parsing as well). I havent tested the dynamic module parser
after the latest optimizations. Back then I tested also with the
conversion code disabled and it still was relatively slow compared to
the native json parsing even before the native joson parsing fixes.

HaiJun Zhang, it will be good if you can report the performance issues
you have with lsp-mode. You may follow the guide in the
https://github.com/emacs-lsp/lsp-mode#performance .


Thanks,
Ivan 


OK. I will do it when I have time.

--5e7cb2d9_34dfbc00_6dce--