[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#20154: 25.0.50; json-encode-string is too slow for large strings
From: |
Ted Zlatanov |
Subject: |
bug#20154: 25.0.50; json-encode-string is too slow for large strings |
Date: |
Mon, 20 Apr 2015 18:20:32 -0400 |
User-agent: |
Gnus/5.130012 (Ma Gnus v0.12) Emacs/25.0.50 (gnu/linux) |
On Sat, 21 Mar 2015 00:02:51 +0200 Dmitry Gutov <dgutov@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