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 #77 received at 20154 <at> debbugs.gnu.org (full text, mbox):

From: Dmitry Gutov <dgutov <at> yandex.ru>
To: 20154 <at> debbugs.gnu.org
Cc: Eli Zaretskii <eliz <at> gnu.org>
Subject: Re: bug#20154: 25.0.50; json-encode-string is too slow for
 large strings
Date: Sun, 22 Mar 2015 01:36:55 +0200
On 03/22/2015 12:20 AM, Ivan Shmakov wrote:

> 	Perhaps a plain vector may fit there?

Where?

> 	FWIW, using replace-match in the loop seem to speed up the
> 	routine by another few percents.

Indeed, it seems so, counter to Eli's advice earlier. Just by a bit.

Anyway, the small boost is nice to have, but the buffer-based 
implementation is actually worse than the current one on small strings 
(because of `with-temp-buffer'). So I don't think we can simply replace 
it. A fast `replace-regexp-in-string' implementation would make that 
possible.

P.S. Please keep the discussion participants in Cc, even if you prefer 
not to receive the copy email.




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.