GNU bug report logs -
#20154
25.0.50; json-encode-string is too slow for large strings
Previous Next
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
View this message in rfc822 format
On 03/20/2015 07:44 PM, Eli Zaretskii wrote:
> That's not what I see here. I cannot get the time above 1 sec even
> with a 1000 time longer input string, if I replace json-encode-char
> with 1+.
What code exactly have you tried? You can't just replace
json-encode-char with 1+. The former returns a string, the latter
returns a number (or a char, I guess).
> So I think your 100ms is the constant overhead of some kind.
If you just changed the upper bound in the defvar init form (from 30000
to something), I suspect you forgot to use C-M-x instead of C-x C-e, to
update the actual value of the variable.
Making the string 10 times longer increases the runtime by ~5 here (0.1
-> 0.5). Another 10x increase in length makes it run 4.3 seconds.
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.