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: Mon, 22 Apr 2019 11:01:37 +0300

> From: yyoncho <address@hidden>
> Date: Mon, 22 Apr 2019 08:38:58 +0300
> Cc: Dmitry Gutov <address@hidden>, S├ębastien Chapuis <address@hidden>, 
>       address@hidden
> 
>  read-from-string doesn't decode.  You need to time
>  decode-coding-string when the string is the entire JSON.
> 
> Can you elaborate? Both json-parse-string and read-from-string do the same 
> from my point of view ->
> convert string to elisp data structure with read-from-string being 3times 
> faster.

Maybe I misunderstood what you were trying to say.

If you were suggesting that we implement reading JSON objects as part
of Emacs, then yes, this won't need to encode/decode anything.  I'm
not sure the result will be as fast as read-from-string, since we are
talking about a different syntax.  Also, I'm not sure how hard would
that be nor how much maintenance will it require (does the JSON spec
change frequently?).  But if someone knows the answers, perhaps it's
an alternative worth considering.





reply via email to

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