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 05:32:37 +0200 Message-ID: <835zs7och6.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> 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="2973"; 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 04:33:12 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 1h8GMJ-0000bh-H1 for geb-bug-gnu-emacs@m.gmane.org; Mon, 25 Mar 2019 04:33:11 +0100 Original-Received: from localhost ([127.0.0.1]:35636 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h8GMI-0003g1-AA for geb-bug-gnu-emacs@m.gmane.org; Sun, 24 Mar 2019 23:33:10 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:37248) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h8GMB-0003fu-Gj for bug-gnu-emacs@gnu.org; Sun, 24 Mar 2019 23:33:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1h8GMA-0003jg-J2 for bug-gnu-emacs@gnu.org; Sun, 24 Mar 2019 23:33:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:43813) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1h8GMA-0003jQ-Ca for bug-gnu-emacs@gnu.org; Sun, 24 Mar 2019 23:33:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1h8GMA-0004i5-3l for bug-gnu-emacs@gnu.org; Sun, 24 Mar 2019 23:33: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 03:33:02 +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.155348476418079 (code B ref 31138); Mon, 25 Mar 2019 03:33:02 +0000 Original-Received: (at 31138) by debbugs.gnu.org; 25 Mar 2019 03:32:44 +0000 Original-Received: from localhost ([127.0.0.1]:57357 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1h8GLs-0004hX-Ba for submit@debbugs.gnu.org; Sun, 24 Mar 2019 23:32:44 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:51016) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1h8GLq-0004hK-CG for 31138@debbugs.gnu.org; Sun, 24 Mar 2019 23:32:42 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:57407) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h8GLj-0003PP-Gr; Sun, 24 Mar 2019 23:32:36 -0400 Original-Received: from [176.228.60.248] (port=2479 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1h8GLj-0008Fo-0a; Sun, 24 Mar 2019 23:32:35 -0400 In-reply-to: (message from yyoncho on Sun, 24 Mar 2019 22:57:58 +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:156738 Archived-At: > From: yyoncho > Date: Sun, 24 Mar 2019 22:57:58 +0200 > Cc: Sébastien Chapuis , > 31138@debbugs.gnu.org > > From what I can see the Qbuffer_list_update_hook is called. Is this with or without the patch I sent? > 1. The hooks are not called initially, I am not sure what triggers them. This makes the json parsing extremely > slow(100 times) The hooks are not called when decoding strings uses a fixed working buffer that is created once and never killed. Then something in your setup causes this single working buffer to become in-use, and Emacs then allocates an additional buffer, which is created and killed each time we need to decode a string. Both creating and killing of that buffer runs the buffer-list-update-hook. > 2. Even without the hooks, the JSON parsing is slower than the emacs -q native parsing when I am running > my setup. This will require additional investigation. Please, let's first finish fixing the factors we do understand already and see what effect that produces. Otherwise I don't see how we can make steady progress in this matter. That is why I sent an initial, most probably incomplete patch. Please apply it and see what it fixes and what it doesn't fix. I must rely on you in this matter, because I cannot reproduce the slowdown on my system. Thanks.