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: Dmitry Gutov
Subject: bug#31138: Native json slower than json.el
Date: Wed, 24 Apr 2019 19:46:16 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1

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).

We could perhaps try
a similar optimization for UTF-8 instead of just ASCII.

I think so.

Turns out we already do, I just missed that.

OK.

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.





reply via email to

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