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: Wed, 24 Apr 2019 20:06:26 +0300 Message-ID: <831s1r2uzx.fsf@gnu.org> References: <87sh806xwa.fsf@chapu.is> <831s22gcci.fsf@gnu.org> <83y349gasn.fsf@gnu.org> <83d0lfag4x.fsf@gnu.org> <5cf45a21-65c3-67ee-f123-be83a6ee7c99@yandex.ru> <83a7gjaen6.fsf@gnu.org> <83ftqa8qsg.fsf@gnu.org> <83muki6y6r.fsf@gnu.org> <4b8c6799-e845-768b-749c-f2a883ab89f8@yandex.ru> <83h8aq6v6a.fsf@gnu.org> <834l6q6ozn.fsf@gnu.org> <83zhoi59ao.fsf@gnu.org> <83wojm57sl.fsf@gnu.org> <83ftq96azk.fsf@gnu.org> <83wojk534g.fsf@gnu.org> <6308ceff-479b-2ce7-2072-41e683978c7c@yandex.ru> <83h8ao4vl0.fsf@gnu.org> <835zr32x2m.fsf@gnu.org> <8f3318e9-25bd-c7af-20dd-ed78d2a92efd@yandex.ru> Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="266363"; mail-complaints-to="usenet@blaine.gmane.org" Cc: 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 Wed Apr 24 19:07: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 1hJLMb-00176u-GN for geb-bug-gnu-emacs@m.gmane.org; Wed, 24 Apr 2019 19:07:17 +0200 Original-Received: from localhost ([127.0.0.1]:44704 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hJLMa-0003oc-Ek for geb-bug-gnu-emacs@m.gmane.org; Wed, 24 Apr 2019 13:07:16 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:52833) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hJLMN-0003lk-J4 for bug-gnu-emacs@gnu.org; Wed, 24 Apr 2019 13:07:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hJLMM-0000xp-3e for bug-gnu-emacs@gnu.org; Wed, 24 Apr 2019 13:07:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:42845) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hJLML-0000vf-VO for bug-gnu-emacs@gnu.org; Wed, 24 Apr 2019 13:07:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hJLML-0001Kd-Kf for bug-gnu-emacs@gnu.org; Wed, 24 Apr 2019 13:07: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: Wed, 24 Apr 2019 17:07: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.15561256045094 (code B ref 31138); Wed, 24 Apr 2019 17:07:01 +0000 Original-Received: (at 31138) by debbugs.gnu.org; 24 Apr 2019 17:06:44 +0000 Original-Received: from localhost ([127.0.0.1]:56389 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hJLM2-0001K4-AX for submit@debbugs.gnu.org; Wed, 24 Apr 2019 13:06:44 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:38315) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hJLLz-0001Jr-Vy for 31138@debbugs.gnu.org; Wed, 24 Apr 2019 13:06:40 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:32813) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hJLLu-0000Ba-Gj; Wed, 24 Apr 2019 13:06:34 -0400 Original-Received: from [176.228.60.248] (port=4609 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1hJLLq-0002KV-80; Wed, 24 Apr 2019 13:06:31 -0400 In-reply-to: <8f3318e9-25bd-c7af-20dd-ed78d2a92efd@yandex.ru> (message from Dmitry Gutov on Wed, 24 Apr 2019 19:46:16 +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:158191 Archived-At: > Cc: sebastien@chapu.is, yyoncho@gmail.com, 31138@debbugs.gnu.org > From: Dmitry Gutov > Date: Wed, 24 Apr 2019 19:46:16 +0300 > > On 24.04.2019 19:21, Eli Zaretskii wrote: > > > Please point me to examples of this, I don't think I understand what > > you have in mind. > > Buffers with output from a process. In this example, the process is a > network connection. Not sure it applies, though. Since output arrives > piece-by-piece, maybe it gets decoded with *-string routines > (mm-decode-string uses that). No, I think it's decoded by low-level code which reads output from the process. At least by default. > > What does libjansson do if it receives strings with bytes it cannot > > interpret? Like raw bytes or UTF-8 sequences whose length is more > > than 4 bytes? > > One could test that directly, but its API docs list different kinds of > errors, including: > > json_error_invalid_utf8 > json_error_null_character > json_error_null_byte_in_key > > And we check for error status in functions that use the encoded values. > > Reading the sources, there are several places where the first error is > signaled. The question is, do we want to signal an error ourselves, or do we want to rely on the library? (And I need to refresh my memory regarding the differences between the internal representation of text and strict UTF-8.)