all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: "Clément Pit--Claudel" <cpitcla@mit.edu>
Cc: emacs-devel@gnu.org
Subject: Re: JSON encoding and decoding performance
Date: Sat, 15 Apr 2017 10:59:42 +0300	[thread overview]
Message-ID: <837f2mgky9.fsf@gnu.org> (raw)
In-Reply-To: <9b65fbad-154f-4a7d-1d1f-9d6e68d71455@mit.edu> (message from Clément Pit--Claudel on Sat, 15 Apr 2017 01:35:45 -0400)

> From: Clément Pit--Claudel <cpitcla@mit.edu>
> Date: Sat, 15 Apr 2017 01:35:45 -0400
> 
> I'm running into performance issues with JSON encoding and decoding.  I have a language mode whose eldoc function makes a call to a language server running as a subprocess, and small lags tend to be visible when moving quickly around the buffer.  Profiling suggests that roughly 25 percent of the time is spent encoding and decoding JSON strings.

Can you show the profiles?  IME, the devil is almost always in the
details.

> Would there be strong objections to supporting a C JSON library in addition to the current ELisp implementation?  This was suggested at one point in https://lists.gnu.org/archive/html/bug-gnu-emacs/2015-03/msg00770.html .  It would be similar in spirit to supporting libxml-parse-region along xml-parse-region, and it could provide nice speed boosts to json-heavy ELisp programs.

Since we have modules now, something that wasn't available back then,
you could roll your own library, right?

Anyway, I think more details about the bottlenecks would be necessary
to make the decision on what would be the best course of action.

Thanks.



  reply	other threads:[~2017-04-15  7:59 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-15  5:35 JSON encoding and decoding performance Clément Pit--Claudel
2017-04-15  7:59 ` Eli Zaretskii [this message]
2017-04-16 15:43   ` Clément Pit--Claudel
2017-04-16 17:05     ` Mark Oteiza
2017-04-20 10:50       ` Philipp Stephani
2017-04-16 17:12     ` Eli Zaretskii
2017-04-20 10:45 ` Philipp Stephani

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=837f2mgky9.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=cpitcla@mit.edu \
    --cc=emacs-devel@gnu.org \
    /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.