I see hugely varied performance depending on how many newlines there are in the file I'm visiting.
Here's an example. I have two JSON files:
$ wget https://github.com/Wilfred/ReVo-utilities/blob/a4bdc40dd2656c496defc461fc19c403c8306d9f/revo-export/dictionary.json?raw=true -O one_line.json $ python -m json.tool <one_line.json >pretty_printed.json
These are two JSON files with the same content.
one_line.json is 18MiB of JSON without any newlines.
pretty_printed.json has newlines and whitespace added, making it 41MiB.
Why does Emacs have such poor performance with long lines, since it's actually fewer bytes? Is there anything I can do to improve performance without reformatting the data outside of Emacs?