[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: JSON encoding and decoding performance

From: Philipp Stephani
Subject: Re: JSON encoding and decoding performance
Date: Thu, 20 Apr 2017 10:45:53 +0000

Clément Pit--Claudel <address@hidden> schrieb am Sa., 15. Apr. 2017 um 08:59 Uhr:
Hi emacs-devel,

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.

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.

I think that's a great idea. I've heard complaints that JSON encoding is too slow for low-latency applications (e.g. https://github.com/abingham/emacs-ycmd/issues/163). This has apparently improved a bit in recent Emacs versions, but given the importance of JSON I think it definitely makes sense to have the fastest implementation available, even if that means reimplementing it in C.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]