[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 10:16:04 +0300 |
> Cc: sebastien@chapu.is, 31138@debbugs.gnu.org
> From: Dmitry Gutov <dgutov@yandex.ru>
> Date: Mon, 22 Apr 2019 01:17:09 +0300
>
> On 21.04.2019 15:15, Eli Zaretskii wrote:
>
> > 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.
>
> Not in my profile.
No? I have these near the top in mine:
+ 7.73% emacs.jansson emacs.jansson [.] stream_get.part.3
+ 3.61% emacs.jansson emacs.jansson [.] strbuffer_append_bytes
+ 3.47% emacs.jansson emacs.jansson [.] lex_scan
+ 1.75% emacs.jansson emacs.jansson [.] lex_get_save
+ 1.58% emacs.jansson emacs.jansson [.] string_get
AFAICT, they are all from libjansson. In this particular profile,
decode_coding_utf_8 looks like this:
+ 4.45% emacs.jansson emacs.jansson [.] decode_coding_utf_8
> Again, if make_specified_string takes 50% of the runtime, even if
> libjansson (or some other JSON lib) worked instantly, we'd only get a 2x
> improvement at most.
I'm not sure it's 50%, as in my profile I have only this:
+ 1.41% emacs.jansson emacs.jansson [.] make_uninit_multibyte_string
Please don't forget that json-parse-string first _encodes_ the input
string in UTF-8, then passes it to libjansson, then _decodes_ each
string element it receives back. So we do some non-trivial processing
besides make_specified_string, and removing decoding only saves part
of that.
- bug#31138: Native json slower than json.el, (continued)
- bug#31138: Native json slower than json.el, yyoncho, 2019/04/21
- bug#31138: Native json slower than json.el, Eli Zaretskii, 2019/04/21
- bug#31138: Native json slower than json.el, Eli Zaretskii, 2019/04/21
- bug#31138: Native json slower than json.el, yyoncho, 2019/04/22
- bug#31138: Native json slower than json.el, Eli Zaretskii, 2019/04/22
- bug#31138: Native json slower than json.el, yyoncho, 2019/04/22
- bug#31138: Native json slower than json.el, Eli Zaretskii, 2019/04/22
- bug#31138: Native json slower than json.el, Ivan, 2019/04/22
- bug#31138: Native json slower than json.el, Eli Zaretskii, 2019/04/22
- bug#31138: Native json slower than json.el, Dmitry Gutov, 2019/04/21
- bug#31138: Native json slower than json.el,
Eli Zaretskii <=
- bug#31138: Native json slower than json.el, Dmitry Gutov, 2019/04/22
- bug#31138: Native json slower than json.el, Eli Zaretskii, 2019/04/22
- bug#31138: Native json slower than json.el, Dmitry Gutov, 2019/04/22
- bug#31138: Native json slower than json.el, Philipp Stephani, 2019/04/21
- bug#31138: Native json slower than json.el, yyoncho, 2019/04/21
- bug#31138: Native json slower than json.el, Philipp Stephani, 2019/04/21
- bug#31138: Native json slower than json.el, Dmitry Gutov, 2019/04/22
- bug#31138: Native json slower than json.el, Eli Zaretskii, 2019/04/22
- bug#31138: Native json slower than json.el, Dmitry Gutov, 2019/04/22
- bug#31138: Native json slower than json.el, Eli Zaretskii, 2019/04/22