vim -c 'syn off'$ time vim -c 'syn off' tt.json
real 0m3.277s user 0m1.690s sys 0m0.349s
So IMO I think vim is being "too dumb" here and should be able to adapt like VSCode does. But, meanwhile, if you want to test under equal conditions, you can disable VSCode's optimization by disabling this setting:
Editor: Large File Optimizations
Or directly in settings.json:
"editor.largeFileOptimizations": falseDisabling the advantages of one application vs another is just kneecapping the superior editor IMO.
edit
new more realistic example: time vim -c 'syn off' <64 MB>.txt vim -c 'syn off' <64 MB>.txt 0.41s user 0.20s system 32% cpu 1.848 total
---
Here is my first, pre edit, example which is invalid. The file was a zip and my install of vim was not opening as text or binary
% time vim -c 'syn off' <48 GB file> vim -c 'syn off' <48 GB file> 0.03s user 0.03s system 2% cpu 2.380 total
$ time vim tt.json
real 0m5.910s user 0m4.120s sys 0m0.343s
$ time nvim tt.json
real 0m2.894s user 0m1.372s sys 0m0.292s
VSCode reads only the visible content and does not load everything for that line. It tokenizes the first 20k chars of the line at maximum, defined by the "editor.maxTokenizationLineLength" setting.
This makes a world of a difference when your editor is configured to wrap lines, or clip or w/e.
You probably happened to have VSCode configured to do something that mitigates the problems of having an extremely long single line, while Vim was not configured to do that.
In case you don't want to investigate the problem, but want to make a more "fair" comparison: use a language that you are comfortable with to format the file with linebreaks and indentation and then load it in different editors.
Defaults matter.
Just found the file. 42MB on a single line. Takes 5 seconds to open in vim, and about 3 seconds for the right arrow to move the cursor one char over. Nothing like gedit, but slower than I expected.