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: Sat, 23 Mar 2019 16:55:32 +0200

> From: yyoncho <yyoncho@gmail.com>
> Date: Sat, 23 Mar 2019 16:32:48 +0200
> Cc: Sébastien Chapuis <sebastien@chapu.is>, 
>       31138@debbugs.gnu.org
> 
> 6. At this point, my/call-counter is 32982 which means that json-parse-string 
> has triggered 32982 calls to
> my/test-query-function . I would add also that the number of strings in the 
> json file that I am using is exactly
> 32982 so I suspect that the issue is related to json_make_string .

OK, but why is that a problem?

> Here it is the output of from single invocation of json-parse-string -
> https://gist.github.com/yyoncho/101a87260b407d9f327b24c72ab15a92 - as you can 
> see there are numerous
> elisp functions invoked under json-parse-string. 

What I see in the profile is this:

  . json-parse-string takes the lion's share of the CPU time, which is
    expected;
  . some byte-compiled function takes another significant portion of
    CPU time; to see what function is that, load the relevant Lisp
    code from a .el file, instead of from .elc file, then re-run the
    profile

> What I am unable to provide is a minimal example so you could reproduce this 
> behaviour on your side using
> emacs -Q. 

Actually, I'm not yet sure what to reproduce.  I'm probably missing
something.





reply via email to

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