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: Sun, 21 Apr 2019 15:15:07 +0300

> From: yyoncho <address@hidden>
> Date: Sun, 21 Apr 2019 14:38:04 +0300
> Cc: Dmitry Gutov <address@hidden>, S├ębastien Chapuis <address@hidden>, 
>       address@hidden
> 
>  I don't see how this follows, when this discussion clearly established
>  that native JSON parsing is much faster than parsing in Lisp.
> 
> We also established that current native performance is not fast enough to 
> handle real-world scenarios. 

Then maybe we should look for a faster JSON parsing library, because
libjansson functions appear in the profile as high or higher than our
decoding routines.  Or maybe this is the limit of what can be done in
Emacs, since there is, and always will be, overhead due to converting
C values to Lisp objects.

>  I also don't see where did "a lot of time" come from, I think it's an
>  exaggeration, given the processing speed shown by benchmarks in this
>  discussion.
> 
> I said that *if* this is the case. You said that if 50% is spent in decoding 
> it is not enough to justify the risk of
> crashing emacs. What I am saying is that IMO if 50% of the time is spent in 
> decoding data that comes from
> Jansson it will be enough to justify not using Jansson at all and writing the 
> whole Json parsing in Emacs
> Source tree.

I don't think I understand how this could help to speed up code,
please explain.

The issue here is not that the library is some code not written by the
Emacs project, because we do the same with text generated by Emacs
Lisp programs.  Bugs can happen in both external libraries and in code
written by Emacs programmers.





reply via email to

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