all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Tom Tromey <tom@tromey.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: Philipp Stephani <p.stephani2@gmail.com>, emacs-devel@gnu.org
Subject: Re: Minor optimization in json.c
Date: Sat, 13 Oct 2018 09:28:24 -0600	[thread overview]
Message-ID: <87lg71c1d3.fsf@tromey.com> (raw)
In-Reply-To: <83va66ux3x.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 13 Oct 2018 10:25:22 +0300")

>>>>> "Eli" == Eli Zaretskii <eliz@gnu.org> writes:

>> 1. Could you try to eliminate global mutable state (i.e. the
>> json_inserted_bytes global variable)? I know that with the current
>> threading implementation access is properly synchronized, but the
>> global variable is still a code smell and unnecessarily couples
>> details of the threading implementation with the JSON adapter code. I
>> think you should be able to move it into the json_insert_data or
>> json_buffer_and_size structures.

Eli> I did that, but it needed adding new members to 2 data structures, and
Eli> copying the values back and forth between them.  Not sure this is more
Eli> elegant.

It's also possible to put this sort of thing into the thread object.

Tom



      reply	other threads:[~2018-10-13 15:28 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
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 [this message]

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=87lg71c1d3.fsf@tromey.com \
    --to=tom@tromey.com \
    --cc=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 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.