by bdcravens · 11y ago · 0 comments
I'm a Sublime license holder, but I use Atom as much as I can, because the more open source can win, the better.
However, yesterday I was doing some complex regex's (porting a random sql dump file into a seeds.rb), and Atom kept dying, whereas Sublime was pretty much instantaneous.
I'm not doing the usual "Atom is slow" drum beating, but saying some undertones of the announcement make me worry a bit. I hear discussion of things like Electron and "social coding" as the future, and I'm hoping that means that no one considers 1.0 to equate to the core editing experience being finished. It's not, and I hope the Atom team continues to iterate before moving on to new features.
Being able to open files larger than 2MB isn't sexy, but it's necessary. Having to hard-kill my editor because the save dialog is trapped on my other full screen session that it won't let me get to deserves more than a "but it's open source" response.
tl;dr congrats team and your core users want the best editor possible over bells and whistles
However, as I understand it, the issue is not so much with raw size (although it does not help) as it is with long lines.
For instance, the following 161K file freezes completely Atom, to the point that you just have to close it: https://github.com/espadrine/aulx/blob/master/html/tokenizer...
The reason is that the core syntax highlighter (https://atom.io/packages/language-javascript) is heavily unoptimized, and tries precomputing data for the whole line without considering that only the first 0.5k characters will probably be seen.
It is too bad, as this was already fixed globally in existing web text editors such as CodeMirror. Given that it is used in Chrome and Firefox' DevTools, and that JS minification happens on the Web, it had to.
I just downloaded it and you are correct, it locks up. Its the really long line here: https://github.com/espadrine/aulx/blob/master/html/tokenizer...
If I open it in Sublime 3 I see that they don't bother to syntax highlight long lines. They just skip it.
Issue filed:
https://github.com/espadrine/aulx/blob/b745723680f541353ad50...
It appears that Sublime Text 3's threshold is 16384 (2^14) characters. Longer lines are not highlighted. Works quite well to be honest.
http://i.imgur.com/McaVhKJ.png?1
The menu has no margins and no padding but, worse of all, everything is tiny. Note that the main text font is smaller than the i3 top bar (which is at the barely readable size).
HiDPI support is not something esoteric nowadays. Lots of hardware requires it, and Linux toolkits support it rather well (not perfect, but ok anyhow).
I fiddled with Atom's CSS enough to test drive it. It is ok for common tasks, albeit a bit sluggish (I come from vim...). I could live with that. What I can't live with is all manners of breakage my custom CSS introduced, so I can't yet do a one month run with the editor to kick the tires.
I'm pretty sure it's a limitation of the underlying webkit, as loading a file that big in the browser is typically a bad use case.
I'm using Sublime 2 on OS X and large files + regular expressions are generally a cause for pain.
Do you have any default settings changed like disabled document preview or similar?
The only thing I generally feel is a champ at regular expressions + insanely large files on OS X is TextWrangler/BBEdit. In fact, I keep TextWrangler around specifically for the large file excellence experience which I (currently) don't receive on Sublime Text 2.
I don't have issues with large files on OS X.
[0]: http://www.sublimetext.com/blog/articles/sublime-text-3-buil...
As a vim/cli/linux user -- I'm trying to understand -- you were doing search-and-replace? As in what one (some would say a masochist) could do with sed/awk? And/or 's' in vim?
(Sed is in some ways more relevant as it works on streams, and so as long as you have the diskspace to store the edited copy, size shouldn't really matter. I suppose it might be possible to have long enough lines that sed chokes, but I've never had to deal with something like that...)
Seems off base to me too.
All in all I'd say the experience editing large files still completely sucks compared to every other editor I use.
Don't get me wrong, I still love and use Atom, but they really need to come up with a solution to this problem, because it's just ridiculous. The fact that I have to occasionally leave my text editor to edit certain text files is a huge black eye that many people won't put up with, and which I will eventually get tired of putting up with if they don't do something about it soon.
One thing I think they could do is take advantage of the fact that when you are editing a file that large, you don't expect to have a particularly good experience with the scrollbar. I don't open a file with 10 million lines and grab the scrollbar to get to the spot I'm looking for; it's just not practical. Over a certain size, they really don't need to have the entire buffer in memory at once, and maybe they don't even need a usable scrollbar so much as they need good relative navigation and search. It would be perfectly reasonable in my opinion to have a "large file mode" for the editor window that has subtly different behavior that makes it not so ridiculously heavy.
Opening up a decent sized development.log did cause it to throw random errors however.