From: Eli Zaretskii <eliz@gnu.org>
To: Dmitry Gutov <dgutov@yandex.ru>
Cc: p.stephani2@gmail.com, emacs-devel@gnu.org
Subject: Re: String encoding in json.c
Date: Tue, 26 Dec 2017 06:35:29 +0200 [thread overview]
Message-ID: <83efnihzse.fsf@gnu.org> (raw)
In-Reply-To: <5e8f561a-fac1-1dbb-1686-d04ef4dfa42c@yandex.ru> (message from Dmitry Gutov on Mon, 25 Dec 2017 22:51:22 +0200)
> Cc: p.stephani2@gmail.com, emacs-devel@gnu.org
> From: Dmitry Gutov <dgutov@yandex.ru>
> Date: Mon, 25 Dec 2017 22:51:22 +0200
>
> On 12/25/17 6:21 PM, Eli Zaretskii wrote:
>
> > OK, but I presume the size of such buffers is rarely more than 1
> > MByte, say?
>
> Maybe not. This bug report:
> https://github.com/abingham/emacs-ycmd/issues/163 mentioned large
> translation units, but I'm not sure which exact sizes are in play. The
> reproduction scenario used a 300 KB example, encoding which was quite
> slow at the time.
I'd expect the Jansson configuration to do that at least 10 to 20
times faster.
> > Files we visit are quite frequently much larger. Which
> > is why I say that if the speed of en/decoding is crucial, we should
> > first and foremost work on speeding up file I/O.
>
> If you mean I/O in general, maybe.
No, I meant file I/O specifically. Our implementation of encoding and
decoding is separate for each one of: (a) file I/O, (b) process and
network I/O, (c) string encoding/decoding, (d) file-name encoding and
decoding (maybe I forget some).
> I'm not sure which encoding speeds json.c allows us now.
Well, Philipp measured it, so maybe he could share the benchmarks and
the results.
> But the JSON structure I was talking about is not written to a file.
> It's sent over the network (usually to a local TCP socket).
In that case, encoding it is not a wasted effort, since it would have
been otherwise encoded when we send it.
next prev parent reply other threads:[~2017-12-26 4:35 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-23 14:26 String encoding in json.c Philipp Stephani
2017-12-23 14:43 ` Eli Zaretskii
2017-12-23 15:31 ` Philipp Stephani
2017-12-23 15:53 ` Eli Zaretskii
2017-12-23 17:27 ` Philipp Stephani
2017-12-23 18:18 ` Eli Zaretskii
2017-12-26 21:42 ` Philipp Stephani
2017-12-27 16:08 ` Eli Zaretskii
2017-12-24 20:48 ` Dmitry Gutov
2017-12-25 16:21 ` Eli Zaretskii
2017-12-25 20:51 ` Dmitry Gutov
2017-12-26 4:35 ` Eli Zaretskii [this message]
2017-12-26 21:50 ` Philipp Stephani
2017-12-27 2:00 ` Dmitry Gutov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=83efnihzse.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=dgutov@yandex.ru \
--cc=emacs-devel@gnu.org \
--cc=p.stephani2@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.