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: Tue, 23 Apr 2019 13:44:27 +0300 Message-ID: References: <87sh806xwa.fsf@chapu.is> <83y349gasn.fsf@gnu.org> <83d0lfag4x.fsf@gnu.org> <5cf45a21-65c3-67ee-f123-be83a6ee7c99@yandex.ru> <83a7gjaen6.fsf@gnu.org> <10ca4e2f-b116-16bc-c81e-24036752c867@yandex.ru> <83lg026xxb.fsf@gnu.org> <0d42dab4-6c5c-be3a-d402-f17b39e7fc3c@yandex.ru> <83k1fm6vly.fsf@gnu.org> <19b19dec-a5a0-e08d-6026-0b9621d38143@yandex.ru> <8336ma6oia.fsf@gnu.org> <83tveq56jr.fsf@gnu.org> <5653b312-38ac-b8f5-1da4-a8f4c1ebe586@yandex.ru> <83muki54tm.fsf@gnu.org> <83a7gh5kie.fsf@gnu.org> <83zhoh3t2d.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="106938"; 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: sebastien@chapu.is, yyoncho@gmail.com, 31138@debbugs.gnu.org To: Eli Zaretskii , Philipp Stephani Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Apr 23 12:45:15 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 1hIsvJ-000RdM-Fq for geb-bug-gnu-emacs@m.gmane.org; Tue, 23 Apr 2019 12:45:13 +0200 Original-Received: from localhost ([127.0.0.1]:51579 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hIsvI-0004jP-FS for geb-bug-gnu-emacs@m.gmane.org; Tue, 23 Apr 2019 06:45:12 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:54990) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hIsvB-0004iz-SO for bug-gnu-emacs@gnu.org; Tue, 23 Apr 2019 06:45:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hIsv9-0005qa-U0 for bug-gnu-emacs@gnu.org; Tue, 23 Apr 2019 06:45:05 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:38981) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hIsv7-0005q1-Vf for bug-gnu-emacs@gnu.org; Tue, 23 Apr 2019 06:45:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hIsv7-0001Av-Sp for bug-gnu-emacs@gnu.org; Tue, 23 Apr 2019 06:45: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: Tue, 23 Apr 2019 10:45: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.15560162794470 (code B ref 31138); Tue, 23 Apr 2019 10:45:01 +0000 Original-Received: (at 31138) by debbugs.gnu.org; 23 Apr 2019 10:44:39 +0000 Original-Received: from localhost ([127.0.0.1]:52525 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hIsul-0001A2-DS for submit@debbugs.gnu.org; Tue, 23 Apr 2019 06:44:39 -0400 Original-Received: from mail-lf1-f48.google.com ([209.85.167.48]:39067) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hIsuj-00019q-VZ for 31138@debbugs.gnu.org; Tue, 23 Apr 2019 06:44:38 -0400 Original-Received: by mail-lf1-f48.google.com with SMTP id d12so11360210lfk.6 for <31138@debbugs.gnu.org>; Tue, 23 Apr 2019 03:44:37 -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=AZVgIuEWSk0OCxq9rcxRLjlqoWT+oOSe0cBumW5yLow=; b=Ah1xNcEdNEgwNBDyveRj83eeo01WhmB7XQMbuixM2sWqxqoQJzSFLr0X4Jsvf2qqRx Gh0GyCIXasK7jVpnl2fsXeXBKMwj6nmPPcUZwPunoimK9lgJ/eJaZc8F7+9fZuL0GLLb zpVU4v+mlcyIqkwedAQTjTq/HnzGoEHoIW4wON5roSTAl4R9a2obl3jKtlHokO8hg1Ga RyUjkLsic5e/sBt6S8nAVR80U8y628SA8E9lFja5m3ttgUyppYJFekqi54q30HhGG92D aiGgn4ddzoNPiEsMKQ+T1SiTwXYapvN8C/xAGFQcKjlZwrklFtvzrcdYbPoEs9twH3Rf UhBQ== 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=AZVgIuEWSk0OCxq9rcxRLjlqoWT+oOSe0cBumW5yLow=; b=GeUobG1ozNfU9iKuxKh/zij7w7P7fs2RSnQ3GiBc/w7M1XAa3dsgM+efVdT7eyu4Hu y+873rqfYU7BmcKXVdt2D3XGN0sEosbaQoKWzvZHlgpsrlcMdTqt+4De93lh75KpLp5y PJ10+WbfVMWw+6vC8a6QuBnlIcG2UjXSl6a1O7WIRneP+mJl9ijMAPkftgj1FhePTzJ8 X5EfUvNVR+90USPMm8fQmSk7Jr0t0GLUYRa4REVOCO5Y8hkfBhU4InlFLS8tSyc1+mWz gz+G839XcQe9D+lYSSrJJ4V5KSN7Y+kM/ttmAaca5lqcLMNj03kxYPxQd+gQhzzOzQYT IxFA== X-Gm-Message-State: APjAAAV0tl0epIYBiJpo22hCOv7q2QVcQh2jUQk9UIqIbI6178XnVLGd I5zE5MM6dknE3gIDZVgKrmFonhXy X-Google-Smtp-Source: APXvYqxF+KBsW77d7uelhuS7srADTs75iIa5Y3pyDsgRdW5G0D4ROMfC5RGQMmBVtL1GGGnoAVYHvg== X-Received: by 2002:ac2:48a5:: with SMTP id u5mr13208924lfg.115.1556016271436; Tue, 23 Apr 2019 03:44:31 -0700 (PDT) Original-Received: from [192.168.1.3] ([185.105.174.23]) by smtp.googlemail.com with ESMTPSA id v11sm3632199lfb.68.2019.04.23.03.44.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 23 Apr 2019 03:44:30 -0700 (PDT) In-Reply-To: <83zhoh3t2d.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:158115 Archived-At: On 23.04.2019 13:38, Eli Zaretskii wrote: >> It's special in the sense that both the JSON RFC and Jansson require >> UTF-8 for interchange, so we don't have to deal with raw bytes and can >> assume all text is UTF-8-encoded. > We agreed to disagree about this long ago. Can we please stop arguing > about this time and again? Even if we don't intend to trust Jansson on this, returning valid UTF-8 is in the contract. So it should be perfectly reasonable to discard any invalid UTF-8 strings it returns and signal an error, rather than try to somehow decode them. Leading to easier to follow code, for one thing. Right now it's not obvious that the "else" branch should never be taken in practice. At this point I'm out of arguments. It is, of course, your call.