GNU bug report logs - #20154
25.0.50; json-encode-string is too slow for large strings

Previous Next

Package: emacs;

Reported by: Dmitry Gutov <dgutov <at> yandex.ru>

Date: Fri, 20 Mar 2015 14:27:01 UTC

Severity: normal

Found in version 25.0.50

Done: Dmitry Gutov <dgutov <at> yandex.ru>

Bug is archived. No further changes may be made.

Full log


Message #133 received at 20154 <at> debbugs.gnu.org (full text, mbox):

From: Ted Zlatanov <tzz <at> lifelogs.com>
To: Dmitry Gutov <dgutov <at> yandex.ru>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 20154 <at> debbugs.gnu.org
Subject: Re: bug#20154: 25.0.50;
 json-encode-string is too slow for large strings
Date: Mon, 20 Apr 2015 18:20:32 -0400
On Sat, 21 Mar 2015 00:02:51 +0200 Dmitry Gutov <dgutov <at> yandex.ru> wrote: 

DG> Maybe implementing `json-encode-string` itself in C isn't strictly
DG> necessary, or even particularly advantageous.

Absolutely, implementing it ourselves is dumb. Because it's been *done
already* many times, in libjson in particular.

DG> How about trying to optimize `replace-match' or
DG> `replace-regexp-in-string' (which are the main two approaches we can
DG> use to implement `json-encode-string') for the case of large input?

I think all the time and effort spent on that would be better spent on
the FFI work, which would also enable libyaml integration and many other
improvements.

Ted




This bug report was last modified 10 years and 38 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.