From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Ivan Yonchovski Newsgroups: gmane.emacs.bugs Subject: bug#38807: [Feature request]: Support lisp workers like web workers. Date: Wed, 25 Mar 2020 18:44:44 +0200 Message-ID: <87ftdwmlj7.fsf@gmail.com> 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> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="90317"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: mu4e 1.3.7; emacs 27.0.60 Cc: 38807@debbugs.gnu.org, michael.albinus@gmx.de To: HaiJun Zhang Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Mar 25 17:45:12 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 1jH99U-000NNh-DR for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 25 Mar 2020 17:45:12 +0100 Original-Received: from localhost ([::1]:39438 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jH99T-0004j6-BV for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 25 Mar 2020 12:45:11 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:54214) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jH99L-0004iv-IY for bug-gnu-emacs@gnu.org; Wed, 25 Mar 2020 12:45:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jH99K-00031d-EP for bug-gnu-emacs@gnu.org; Wed, 25 Mar 2020 12:45:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:51696) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jH99K-00031K-BD for bug-gnu-emacs@gnu.org; Wed, 25 Mar 2020 12:45:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jH99K-0007cz-7E for bug-gnu-emacs@gnu.org; Wed, 25 Mar 2020 12:45:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Ivan Yonchovski Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 25 Mar 2020 16:45:02 +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.158515469429294 (code B ref 38807); Wed, 25 Mar 2020 16:45:02 +0000 Original-Received: (at 38807) by debbugs.gnu.org; 25 Mar 2020 16:44:54 +0000 Original-Received: from localhost ([127.0.0.1]:57669 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jH99C-0007cQ-GZ for submit@debbugs.gnu.org; Wed, 25 Mar 2020 12:44:54 -0400 Original-Received: from mail-lj1-f175.google.com ([209.85.208.175]:40039) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jH99B-0007cE-7X for 38807@debbugs.gnu.org; Wed, 25 Mar 2020 12:44:54 -0400 Original-Received: by mail-lj1-f175.google.com with SMTP id 19so3197187ljj.7 for <38807@debbugs.gnu.org>; Wed, 25 Mar 2020 09:44:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=references:user-agent:from:to:cc:subject:in-reply-to:date :message-id:mime-version; bh=17plhFQIaQEvuumIaqDW8e3DFRKc6YmBcKgOI8zdA6Q=; b=u6Nzb5hjd86XQffC5Ulac9c9Huz33F0ihfmMpbuOsU4wl+2GD/y4ks1CZ5G0hBX9Xt j1qNTog+1HT+5AvUN7qf/JUvvPlz9egNyaRwGKJ320ckJnJMeIZpGUmjMgwLFCcWZ7Rq zw178bZyxWYWNFLzjuodnAXTYtfVKkxo8Pn+DGiwJ5B9XUgvk8JYqsx7qO9WvXA2rLlV rZOEGkH4s0qnwCYBJcGr6/s+m4HQykurxhddXX5+2a8JGjFzFSVizDkMBsuKGlXnZQbp h/4Gq/IKgzw2F3niZb87E8bBCpIB20iImextBY+ue9oivIIDYYQpmeS7weGrgJcyTPSU 8tsw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:references:user-agent:from:to:cc:subject :in-reply-to:date:message-id:mime-version; bh=17plhFQIaQEvuumIaqDW8e3DFRKc6YmBcKgOI8zdA6Q=; b=kEKYbx4zzsTnQb6WrH5JzUBLdiHMzaNNxvX+/UiG6oS2UlGNIZ+4tFA3Qt90dir+5P 9NllqNEq+6Pn9/gzK20TqIrPzUN7waZ2OGGDBSi5PCjFLzaj/bcv6lvEJrbfF+E6zO/w A6HX6eS5ZGbq1m9dNvyEQXL91T/WsGQLpLXVYjBQ/1eFEPkfJXTepz0aS00yOVK4yvC4 TvKy2ZSMthVynhP0dbwXE5aSnWt94qW1o6J5+OkekIXN56HPV2VKJaVmNMel1lefjldq dLdqDis6RedwI9RoYqKN1CMYMvnSYisHLt4MzZ1t0d0kPSUn9A/ROm1nXnsU8tmeh6Br qymA== X-Gm-Message-State: AGi0PuZADqESL9FTK4v1JPGoKTW7PA5o4fjqP+zXUEeB2L3vKitpoOkW s6Q+AXz1x+qudTxuxEZP+6ocys1s X-Google-Smtp-Source: ADFU+vtxj6WvKsAWFd4ICZNemSYDO6mp7n4HCx/wAJ8rtgm8bkP2kWgwG/u5pKq7UF6N29n/I+Zp8g== X-Received: by 2002:a2e:978d:: with SMTP id y13mr2476878lji.293.1585154686675; Wed, 25 Mar 2020 09:44:46 -0700 (PDT) Original-Received: from kyoncho-H87-D3H ([2a00:4802:28d:1200:f55d:a928:6b5c:8e30]) by smtp.gmail.com with ESMTPSA id v9sm12266709ljv.82.2020.03.25.09.44.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Mar 2020 09:44:45 -0700 (PDT) In-reply-to: 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:177709 Archived-At: HaiJun Zhang writes: >> > If json messages are parsed 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 done 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 some 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