bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#31138: Native json slower than json.el


From: Eli Zaretskii
Subject: bug#31138: Native json slower than json.el
Date: Wed, 24 Apr 2019 20:43:47 +0300

> Cc: sebastien@chapu.is, yyoncho@gmail.com, 31138@debbugs.gnu.org
> From: Dmitry Gutov <dgutov@yandex.ru>
> Date: Wed, 24 Apr 2019 20:36:56 +0300
> 
> On 24.04.2019 20:06, Eli Zaretskii wrote:
> 
> > No, I think it's decoded by low-level code which reads output from the
> > process.  At least by default.
> 
> But what conversion primitives does that low-level code use? 
> code_convert_region?

AFAICS, it uses decode_coding_c_string.  Incoming data doesn't have to
be UTF-8, mind you, it could be anything, including an unknown
encoding that needs detecting, and only the detection tells us it's
UTF-8.

> > The question is, do we want to signal an error ourselves, or do we
> > want to rely on the library?
> 
> Relying on the library is probably faster.

Why faster?

And more importantly, will the error indication be useful enough to
the Lisp program that triggered it?  If we signal an error, we can
make sure of that.

> I'll happily benchmark a patch, if you have any.

OK.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]