bug-gnu-emacs
[Top][All Lists]
Advanced

[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: Dmitry Gutov
Subject: bug#20154: 25.0.50; json-encode-string is too slow for large strings
Date: Sun, 22 Mar 2015 20:26:37 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:36.0) Gecko/20100101 Thunderbird/36.0

On 03/22/2015 07:31 PM, Eli Zaretskii wrote:

But when you've encoded them once, you only need to encode the
additions, no?  If you can do this incrementally, the amount of work
for each keystroke will be much smaller, I think.

It seems I've misunderstood you here, sorry.

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?





reply via email to

[Prev in Thread] Current Thread [Next in Thread]