Even turning off the swap etc only partially mitigates the load time.
I would like to suggest that perhaps vim could be modified to open files in 'stages'. That is, the first relatively small chunk could be read in an lines processed, and the file shown, while vim continued to load the rest of the file.
This would give a better user experience since the load time would be very fast even on large files. The downside of course is that nothing requiring line-numbers could be done until the entire file had been read.
Comments?
I've personally found, even on a quad-core Windows 7 system, with my entire Vim config disabled, and the settings in LargeFile applied manually, that just reading or writing files of several hundred Megabytes is unbelievably slow in Vim.
The "head" and "tail" (and I think there is another) command in Unix-like systems allows extracting parts of a file, and I'm sure there's a way to put it back together later. I'm not sure of the equivalent on Windows. I don't actually ever need to edit a file that big, so I haven't bothered looking for a plugin to do that splicing for me.
Other than that...you'll probably just need to use a different program for this.
That's not what I saw. I let Vim run after doing :w for several minutes, and then force-killed it.
My file was millions of very small lines (maybe empty, I don't remember). I don't plan on trying again for now.
Vim's syntax colouring is brilliant for viewing log files; simple enough for on-the-fly highlighting of the stuff one is interested in.
> but vim takes a very long time to open huge files.
A "very long time"? My vim on Kubuntu 13.04, on a 7 year old dual core Athlon, 4 GiB RAM, takes 30 s to load 1 GiB of C source, after clearing the OS disc cache. I mention this because there have been reports of slowness of vim running on "network shares", and maybe there's some such slowing you down.
If you're just looking at the end of the file,
tail -n 100000 large_file | vim -
is quick and can be useful. (Shame vim won't open a loop device.)
Regards, John Little