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: yyoncho
Subject: bug#31138: Native json slower than json.el
Date: Tue, 23 Apr 2019 18:36:18 +0300

Hi Eli,

Another posibility is to have two string convertion methods.

Thanks,
Ivan

On Tue, Apr 23, 2019 at 6:10 PM Eli Zaretskii <address@hidden> wrote:
> From: Philipp Stephani <address@hidden>
> Date: Tue, 23 Apr 2019 16:40:10 +0200
> Cc: Eli Zaretskii <address@hidden>, Sébastien Chapuis <address@hidden>,
>       yyoncho <address@hidden>, address@hidden
>
> For starters, the module code in emacs-module.c (e.g.
> module_make_string) has essentially the same requirements. So we could
> at least move json_make_string, json_build_string, and json_encode
> into coding.[ch] (and rename them).

If we want to make this more general-purpose, we should time the code
with very long strings.  It could be that beyond some length the UTF-8
verification, if it fails, will make the conversion slower, in which
case we probably should not take the shortcut beyond that length
limit.

Or we might document that non-UTF-8 strings will be slower to convert,
if that's acceptable.

reply via email to

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