From: Eli Zaretskii <eliz@gnu.org>
To: p.stephani2@gmail.com
Cc: emacs-devel@gnu.org
Subject: Re: Minor optimization in json.c
Date: Sun, 23 Sep 2018 12:06:38 +0300 [thread overview]
Message-ID: <83zhw8bn1d.fsf@gnu.org> (raw)
In-Reply-To: <83efdld3no.fsf@gnu.org> (message from Eli Zaretskii on Sat, 22 Sep 2018 17:10:03 +0300)
> Date: Sat, 22 Sep 2018 17:10:03 +0300
> From: Eli Zaretskii <eliz@gnu.org>
> Cc: emacs-devel@gnu.org
>
> Currently, json.c has this FIXME:
>
> /* FIXME: This should be possible without creating an intermediate
> string object. */
> Lisp_Object string
> = json_make_string (buffer_and_size->buffer, buffer_and_size->size);
> insert1 (string);
>
> IIUC the issue, the change below should fix this. All the tests in
> json-tests.el pass after the change, but maybe you had failures in
> other scenarios? If not, I think we should make this change.
Actually, I think an even better idea is to do this like
insert-file-contents does: insert the raw string into the gap, then
decode it in one go with decode_coding_gap. I will publish a proposed
patch along these lines soon.
next prev parent reply other threads:[~2018-09-23 9:06 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-22 14:10 Minor optimization in json.c Eli Zaretskii
2018-09-23 9:06 ` Eli Zaretskii [this message]
2018-09-23 13:06 ` Eli Zaretskii
2018-10-03 19:57 ` Philipp Stephani
2018-10-13 7:25 ` Eli Zaretskii
2018-10-13 15:28 ` Tom Tromey
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=83zhw8bn1d.fsf@gnu.org \
--to=eliz@gnu.org \
--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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).