3 ms·
A word of caution: some editors will choke on large files or, in particular, long lines. Opening a one-line JSON file of a few MB in Emacs can be painful. The
by chriswarbo 10y ago
A word of caution: some editors will choke on large files or, in particular, long lines.
Opening a one-line JSON file of a few MB in Emacs can be painful. The editor struggles to handle the long line and the matching-parenthesis-highlighter runs its stack machine down the whole length looking for the closing delimiter.
There are ways to avoid this, like pretty-printing the JSON across multiple lines, or forcing fundamental-mode when large files are opened, but I still haven't set these up as default.
- TMSZ 10y ago(Emacs) That's weird. Smart editor should render only portion visible to user and number of lines should not make any difference for highlighter. I've checked Scintilla with 3MB single-line JSON and using C++ lexer (actually: "Lexer for C++, C, Java, and JavaScript") and it has no problems except for some lack of fluency when scrolling horizontally.