Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I tried Sublime Text 2, loaded up a 150mb log file. It took over one minute to load, then crashed a few seconds later. I uninstalled it and am keeping Notepad++ and donating money to it.


Really? I'm honestly surprised.

One of the things I love about Sublime 2 is how it handles large files.

I just ran `cat /dev/urandom > test.log` for about 15 seconds to generate a 160MB file, and it's currently opening in the background with a nice smooth status bar in Sublime, using up a single yielding thread while remaining completely and entirely UI responsive while loading. You can cancel loading at any time by closing the file; this doesn't interrupt workflow or slow you down at all if you accidentally open a massive file (awesome).

It finished opening the entire 1.1 million (!) line file in about 2 minutes, followed by a brief 3 second delay, followed by displaying it perfectly in the editor. I could smoothly scroll through the whole file (as smooth as if it were 100 lines), even using the minimap that displays a small representation of the whole file. Memory usage jumped about 200 MB, but that's to be expected and is rather efficient considering the task.

I'm not a Sublime evangelist or anything, just saying my experience completely contradicts yours, to such a degree that I think of Sublime second when I want to open large files.

Why second? Well, because you should really be using command line tools for files that big anyway.

*edit: Almost forgot to delete that test file. Whew.


vim loads the same file in 3 seconds. (Doing large smooth scrolls using the scrollbar lags out for a few seconds, but jumping to a given line is instantaneous.)


That's a relatively recent feature. Several months ago opening large files would stall Sublime something fierce.


I have personally never (thankfully) had to edit a log file larger then perhaps 10mb.. May I ask what you do if you open those kinds of files so often that you let that be the deciding factor in choosing editor?


I never had problems with large files on Sublime Text, in fact when vim chokes on those, I open them in Sublime. Notepad++ does handle those with ease, but only on win, Sublime Text is cross platform.


Vim chokes on large files? Never ever has for me on any platform (Linux, OSX and Windows) that I have used it on.


Vim sometimes chokes on long lines, and very rarely on long files. Both of these are caused by the plugins and settings you have enabled though, not by how the editor works.

If you have a plugin that scans through every line in a file (yes, some are this stupid), a large file will take ages to load. Some syntax highlighters that use inefficient regexes have a similar problem, but with long lines.

You can test this by opening your giant file with `vim -u NONE large.txt`. That disables your .vimrc.


Thanks for the tip, I will check it out.


Never happened here either. And I frequently use vim to edit Geonames data sets.

I just opened allCountries.txt[1] in ~36 seconds on my MBA and vim scrolls through the file smoothly. 8 256 007 lines taking up 960MB.

[1] http://download.geonames.org/export/dump/allCountries.zip


log files like that are opened with cat and grep on the console.


Pro Tip: If you have to open huge files on a Mac, use TextWrangler. No, not BBEdit. TextWrangler. It's fast as shit with giant log files and SQL dumps.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: