(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.
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.