From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.bugs Subject: bug#31138: Native json slower than json.el Date: Sun, 21 Apr 2019 12:15:59 +0300 Message-ID: <5cf45a21-65c3-67ee-f123-be83a6ee7c99@yandex.ru> References: <87sh806xwa.fsf@chapu.is> <83r2awnw0w.fsf@gnu.org> <83d0mgnn31.fsf@gnu.org> <835zs7och6.fsf@gnu.org> <83tvfqnbxc.fsf@gnu.org> <83lg12n75s.fsf@gnu.org> <83h8bqn2ik.fsf@gnu.org> <83zhphliil.fsf@gnu.org> <181b93a3-3861-0481-1b95-8344410d1049@yandex.ru> <83r2a2hdxn.fsf@gnu.org> <21f68973-a684-2a65-82eb-c8f3df90127f@yandex.ru> <83d0lmgez2.fsf@gnu.org> <7d503be9-4d85-3d0b-6829-631ad376ba3d@yandex.ru> <831s22gcci.fsf@gnu.org> <83y349gasn.fsf@gnu.org> <83d0lfag4x.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="215112"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 Cc: 31138@debbugs.gnu.org To: Eli Zaretskii , sebastien@chapu.is, yyoncho@gmail.com Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Apr 21 11:17:18 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 1hI8b7-000tqv-1h for geb-bug-gnu-emacs@m.gmane.org; Sun, 21 Apr 2019 11:17:17 +0200 Original-Received: from localhost ([127.0.0.1]:50786 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hI8b5-0003GR-W6 for geb-bug-gnu-emacs@m.gmane.org; Sun, 21 Apr 2019 05:17:16 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:50374) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hI8at-0003G9-22 for bug-gnu-emacs@gnu.org; Sun, 21 Apr 2019 05:17:03 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hI8as-00020f-6d for bug-gnu-emacs@gnu.org; Sun, 21 Apr 2019 05:17:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:34122) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hI8as-00020Y-34 for bug-gnu-emacs@gnu.org; Sun, 21 Apr 2019 05:17:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hI8ar-0008PF-Tb for bug-gnu-emacs@gnu.org; Sun, 21 Apr 2019 05:17:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 21 Apr 2019 09:17: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.155583817332254 (code B ref 31138); Sun, 21 Apr 2019 09:17:01 +0000 Original-Received: (at 31138) by debbugs.gnu.org; 21 Apr 2019 09:16:13 +0000 Original-Received: from localhost ([127.0.0.1]:47666 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hI8a4-0008O8-L1 for submit@debbugs.gnu.org; Sun, 21 Apr 2019 05:16:12 -0400 Original-Received: from mail-lj1-f177.google.com ([209.85.208.177]:38895) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hI8a2-0008Nt-3x for 31138@debbugs.gnu.org; Sun, 21 Apr 2019 05:16:10 -0400 Original-Received: by mail-lj1-f177.google.com with SMTP id p14so7977819ljg.5 for <31138@debbugs.gnu.org>; Sun, 21 Apr 2019 02:16:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=S5EnIIpDsioLvxG/fuHOiVZhMnrLJSoDhVCA7RUfJGo=; b=VkNDzumChAbKbhzW6S3vIJ3g6BSvvX7VcAQoJu1/CULz6bivQvm99jRARe06f5akD5 xprtb7nMU50HUEsOu+P3/ZVz6x3YyYmyC6ddRtwdrVNMPAs6MidXp/OUpwtxlz5OqSz3 KM34Y6tg8DEQ4RSXHkMorCzadQGmwQde1L08QBwP3BjarpH3vfApLuF4V8B6EES6aUJ7 xKJAXEJuYw7BLXjSJpq2bcZICa1gbbSaGkzbUeDs31qYaqezp99Pwib4RNYPsoonfsft 50hefrOjKYTJmPviYTQ2wLhhV7JdYvhN8BPMMNtmahoCAKrQkKdEjwCfvQtbe1hR6ie9 0ktA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=S5EnIIpDsioLvxG/fuHOiVZhMnrLJSoDhVCA7RUfJGo=; b=nZ1M6wM0fwpoYF1WKrMKjobHAkLjuIzLPpWHztC1/IGbia0n171eif0U6PcJbLPtLS R/2uSjm23yAMh0Y5C16vwmKhr9wdTWS9jmJNqfmIvf/zTPgeLOXKfhKSXty5MbHObynQ mQIKu6CK3ITBlgIuFim1XmcE+GbPLn8or635ROrGsQBHnXX0HOiLTA34scOS1QFkz28A z/BFoPp8HZi8W3UO0/vo8dP4nKq+ovpAWTDG1nDktkTMxnRhvf94sT0D9iHwLNN1VgCP MKe08d2ERHK6QQpS3bCyCYnraE5aCLzfwGMpjhGq7/d1OH+cjlgeFj1rAcMHX1u07okP Es5g== X-Gm-Message-State: APjAAAWGyzF18kvX11oAreCXpbDhPgygq4y0teT2JIba67sJsO22B8ws /2yR6kuGHKCg83HzaPHJejjB1utQ X-Google-Smtp-Source: APXvYqyW2V0FGF/ET5dBYeP19B8vB2E34pBuSilJrd7s4QJ/kTXmtJpjlKuI9KXo8LgI94Y7skOojw== X-Received: by 2002:a2e:9c0a:: with SMTP id s10mr7037537lji.162.1555838163851; Sun, 21 Apr 2019 02:16:03 -0700 (PDT) Original-Received: from [192.168.1.3] ([185.105.174.23]) by smtp.googlemail.com with ESMTPSA id l13sm2393993lfc.61.2019.04.21.02.16.01 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 21 Apr 2019 02:16:02 -0700 (PDT) In-Reply-To: <83d0lfag4x.fsf@gnu.org> Content-Language: en-US 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:157933 Archived-At: On 21.04.2019 11:58, Eli Zaretskii wrote: > I profiled the code, and my results are very similar to yours. My > interpretation of the results is that decoding strings that we receive > from the jansson library takes less than 10% of the CPU time. So I > think we don't need to worry about this aspect when considering > parsing of JSON objects. Eli, how did you reach that conclusion? One: looking at the profile, libjansson is somewhere down below, and most of the runtime is taken by Emacs. Two: while I might be misreading the profile, simply omitting the decoding function call (and using the returned strings as-is) halves the execution time. How could that be compatible with your interpretation?