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: Tue, 23 Apr 2019 09:00:09 +0300 Message-ID: <83a7gh5kie.fsf@gnu.org> References: <87sh806xwa.fsf@chapu.is> <83d0lmgez2.fsf@gnu.org> <7d503be9-4d85-3d0b-6829-631ad376ba3d@yandex.ru> <831s22gcci.fsf@gnu.org> <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> Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="247937"; mail-complaints-to="usenet@blaine.gmane.org" Cc: p.stephani2@gmail.com, sebastien@chapu.is, yyoncho@gmail.com, 31138@debbugs.gnu.org To: Dmitry Gutov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Apr 23 08:18: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 1hIokw-0012PK-92 for geb-bug-gnu-emacs@m.gmane.org; Tue, 23 Apr 2019 08:18:14 +0200 Original-Received: from localhost ([127.0.0.1]:48783 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hIokv-0007PE-73 for geb-bug-gnu-emacs@m.gmane.org; Tue, 23 Apr 2019 02:18:13 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:45867) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hIojA-0006B6-DF for bug-gnu-emacs@gnu.org; Tue, 23 Apr 2019 02:16:25 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hIoUI-0006aj-9H for bug-gnu-emacs@gnu.org; Tue, 23 Apr 2019 02:01:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:38643) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hIoUI-0006aT-6S for bug-gnu-emacs@gnu.org; Tue, 23 Apr 2019 02:01:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hIoUH-0000hq-TW for bug-gnu-emacs@gnu.org; Tue, 23 Apr 2019 02:01:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 23 Apr 2019 06:01: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.15559992302668 (code B ref 31138); Tue, 23 Apr 2019 06:01:01 +0000 Original-Received: (at 31138) by debbugs.gnu.org; 23 Apr 2019 06:00:30 +0000 Original-Received: from localhost ([127.0.0.1]:52187 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hIoTk-0000gw-IN for submit@debbugs.gnu.org; Tue, 23 Apr 2019 02:00:30 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:58021) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hIoTg-0000gh-77 for 31138@debbugs.gnu.org; Tue, 23 Apr 2019 02:00:26 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:55349) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hIoTa-00066F-Fi; Tue, 23 Apr 2019 02:00:18 -0400 Original-Received: from [176.228.60.248] (port=1267 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1hIoTY-0004r7-GG; Tue, 23 Apr 2019 02:00:17 -0400 In-reply-to: (message from Dmitry Gutov on Tue, 23 Apr 2019 01:23:44 +0300) 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:158100 Archived-At: > Cc: p.stephani2@gmail.com, sebastien@chapu.is, yyoncho@gmail.com, > 31138@debbugs.gnu.org > From: Dmitry Gutov > Date: Tue, 23 Apr 2019 01:23:44 +0300 > > On 22.04.2019 20:26, Eli Zaretskii wrote: > > I don't think we should abort, we don't do that anywhere else. > > The key word here is "validation". If certain folks in this discussion > are right, libjansson always returns valid utf-8 encoded strings, or > intends to. > > So if we implement fast validation for multibyte strings as well, the > "else" branch should never be taken, and it would make sense to abort in > that case. Not necessarily abort as in "exit Emacs", but maybe signal an > error. The libjansson developers might in the end be thankful for bug > reports. The interests of libjansson developers aside, I disagree that low-level text decoding functionality should signal an error, let alone abort. It is up to the application to decide whether having raw bytes in strings is legit or not. This is our policy everywhere, including when UTF-8 is the standard encoding, so I don't think this case is special in any way.