From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#31138: Native json slower than json.el Date: Mon, 25 Mar 2019 22:05:23 +0200 Message-ID: <83h8bqn2ik.fsf@gnu.org> References: <87sh806xwa.fsf@chapu.is> <834lkf7ely.fsf@gnu.org> <878t9own1p.fsf@chapu.is> <838t9o4hvl.fsf@gnu.org> <83r2ayovkx.fsf@gnu.org> <83pnqiormy.fsf@gnu.org> <83lg15pvzr.fsf@gnu.org> <83k1gppu73.fsf@gnu.org> <83ftrdprmj.fsf@gnu.org> <83d0mhpn99.fsf@gnu.org> <83zhplo25s.fsf@gnu.org> <83va09nwg3.fsf@gnu.org> <83tvftne0j.fsf@gnu.org> <40DA9396-044E-4D00-946E-42B776B51BFA@gnu.org> <83r2awnw0w.fsf@gnu.org> <83d0mgnn31.fsf@gnu.org> <835zs7och6.fsf@gnu.org> <83tvfqnbxc.fsf@gnu.org> <83lg12n75s.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="55673"; mail-complaints-to="usenet@blaine.gmane.org" Cc: sebastien@chapu.is, 31138@debbugs.gnu.org To: yyoncho Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Mar 25 21:06:14 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1h8VrJ-000EMg-O8 for geb-bug-gnu-emacs@m.gmane.org; Mon, 25 Mar 2019 21:06:13 +0100 Original-Received: from localhost ([127.0.0.1]:47732 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h8VrI-0001IK-0V for geb-bug-gnu-emacs@m.gmane.org; Mon, 25 Mar 2019 16:06:12 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:56285) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h8Vr9-0001I3-IT for bug-gnu-emacs@gnu.org; Mon, 25 Mar 2019 16:06:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1h8Vr8-0006K2-GI for bug-gnu-emacs@gnu.org; Mon, 25 Mar 2019 16:06:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:45161) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1h8Vr8-0006I0-7c for bug-gnu-emacs@gnu.org; Mon, 25 Mar 2019 16:06:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1h8Vr7-0000ej-Va for bug-gnu-emacs@gnu.org; Mon, 25 Mar 2019 16:06:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 25 Mar 2019 20:06:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 31138 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: moreinfo Original-Received: via spool by 31138-submit@debbugs.gnu.org id=B31138.15535443452496 (code B ref 31138); Mon, 25 Mar 2019 20:06:01 +0000 Original-Received: (at 31138) by debbugs.gnu.org; 25 Mar 2019 20:05:45 +0000 Original-Received: from localhost ([127.0.0.1]:58705 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1h8Vqr-0000eA-H1 for submit@debbugs.gnu.org; Mon, 25 Mar 2019 16:05:45 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:41719) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1h8Vqo-0000du-4w for 31138@debbugs.gnu.org; Mon, 25 Mar 2019 16:05:42 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:42305) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h8Vqf-0004yf-8D; Mon, 25 Mar 2019 16:05:34 -0400 Original-Received: from [176.228.60.248] (port=4581 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1h8Vqa-0003Oi-IA; Mon, 25 Mar 2019 16:05:29 -0400 In-reply-to: (message from yyoncho on Mon, 25 Mar 2019 21:16:53 +0200) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] 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.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:156788 Archived-At: > From: yyoncho > Date: Mon, 25 Mar 2019 21:16:53 +0200 > Cc: Sébastien Chapuis , > 31138@debbugs.gnu.org > > I am unable to see any difference in the performance of the json parsing in emacs -q and in my setup - it is > still ~2 times slower. You mean, in your setup it's twice slower than in "emacs -Q"? And you are saying that the changes I made have no effect on the performance? Then what about the 100-fold slowdown you were talking about, allegedly caused by the hooks? > I believe that it is caused by code_convert_string . This needs some more specific explanation, because code_convert_string is called in both your setup and in "emacs -Q". So it isn't code_convert_string itself, it's something else, perhaps triggered by code_convert_string, like those hooks I disabled. > I compiled emacs without that call and > there is no difference in performance in both setups and the parsing is 2 times faster than emacs -q with > code_convert_string. It's small wonder that removing code makes functions which called that code work faster. What does removing code_convert_string achieve except showing this truism in action? > I want to discuss the native json performance in the context of lsp-mode needs. Is it ok to do it in this thread? It depends on what you want to discuss, exactly. And I'm still confused regarding the performance that bothers you. Is the problem the two-fold slowdown relative to "emacs -Q", or is the problem much worse slowdown in some other situation? Is the patch I sent useful and should be pushed, or do you no longer care about it because it doesn't help you? I feel that I no longer understand what problem we are trying to solve, and that no matter what improvements I propose, the discussion always ends up insisting that code_convert_string is the culprit.