[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: |
Eli Zaretskii |
Subject: |
bug#20154: 25.0.50; json-encode-string is too slow for large strings |
Date: |
Sun, 22 Mar 2015 20:32:38 +0200 |
> Date: Sun, 22 Mar 2015 20:26:37 +0200
> From: Dmitry Gutov <dgutov@yandex.ru>
> CC: 20154@debbugs.gnu.org
>
> The question of "why encode everything again" comes to down programmer's
> convenience, and not re-implementing parts of the JSON encoder.
>
> At least until `json-encode' has a way to pass an already-encoded string
> verbatim, how else would you encode an alist like
>
> `(("file_data" .
> ((,full-path . (("contents" . ,file-contents)
> ("filetypes" . ,file-types)))))
> ("filepath" . ,full-path)
> ("line_num" . ,line-num)
> ("column_num" . ,column-num))
>
> to JSON, except by encoding everything again?
Caveat: I'm probably missing something simple here, so excuse in
advance for asking stupid questions.
You said you need to encode everything on every keystroke, so I was
wondering why you couldn't encode just the new keystroke, and append
the result to what you already encoded earlier. Then send everything
to the server, as it expects. The problem is in encoding, not in
sending.
- bug#20154: 25.0.50; json-encode-string is too slow for large strings, (continued)
- bug#20154: 25.0.50; json-encode-string is too slow for large strings, Eli Zaretskii, 2015/03/20
- bug#20154: 25.0.50; json-encode-string is too slow for large strings, Dmitry Gutov, 2015/03/20
- bug#20154: 25.0.50; json-encode-string is too slow for large strings, Eli Zaretskii, 2015/03/21
- bug#20154: 25.0.50; json-encode-string is too slow for large strings, Eli Zaretskii, 2015/03/21
- bug#20154: 25.0.50; json-encode-string is too slow for large strings, Dmitry Gutov, 2015/03/21
- bug#20154: 25.0.50; json-encode-string is too slow for large strings, Eli Zaretskii, 2015/03/21
- bug#20154: 25.0.50; json-encode-string is too slow for large strings, Dmitry Gutov, 2015/03/21
- bug#20154: 25.0.50; json-encode-string is too slow for large strings, Eli Zaretskii, 2015/03/22
- bug#20154: 25.0.50; json-encode-string is too slow for large strings, Dmitry Gutov, 2015/03/22
- bug#20154: 25.0.50; json-encode-string is too slow for large strings, Dmitry Gutov, 2015/03/22
- bug#20154: 25.0.50; json-encode-string is too slow for large strings,
Eli Zaretskii <=
- bug#20154: 25.0.50; json-encode-string is too slow for large strings, Dmitry Gutov, 2015/03/22
- bug#20154: 25.0.50; json-encode-string is too slow for large strings, Drew Adams, 2015/03/21
- bug#20154: 25.0.50; json-encode-string is too slow for large strings, Dmitry Gutov, 2015/03/21
- bug#20154: 25.0.50; json-encode-string is too slow for large strings, Dmitry Gutov, 2015/03/20
- bug#20154: 25.0.50; json-encode-string is too slow for large strings, Eli Zaretskii, 2015/03/21
- bug#20154: 25.0.50; json-encode-string is too slow for large strings, Dmitry Gutov, 2015/03/21
- bug#20154: 25.0.50; json-encode-string is too slow for large strings, Ivan Shmakov, 2015/03/21
- bug#20154: 25.0.50; json-encode-string is too slow for large strings, Dmitry Gutov, 2015/03/21
- bug#20154: 25.0.50; json-encode-string is too slow for large strings, Dmitry Gutov, 2015/03/22
- bug#20154: 25.0.50; json-encode-string is too slow for large strings, Ivan Shmakov, 2015/03/22