126 points · by dchuk · 9y ago · 137 comments
It claims to fix the biggest complaint about atom: speed of editing and memory usage of edited files.
They did it by re-writing backing store for documents from JavaScript to C++.
C++ data models can be write once compile almost-everywhere (all desktop platforms at least) pretty easily. You can write C++ code that compiles on iOS, Android, Windows, and MacOS, and Linux, without any great difficulty.
Making all the UI and system integration code cross platform is a more valuable service. Just dealing with something like the Clipboard on all the above mentioned platforms is a lot of boilerplate code. Not to even get to actual UI widgets!
I thought most of the excitement was about getting away from manual memory management into higher level languages and building something that works across the web and desktop, not just simplifying desktop busy work with native UIs.
Their tagline is "Build cross platform desktop apps with JavaScript, HTML, and CSS"--if you need C++ to truly get the app you want, it seems like the value proposition is severely diminished.
Which is the idea behind WebAssembly and why we're seeing it discussed more often these days
One of the main goals of Atom is to be the most hackable text editor ever. Given that goal, Electron is the ideal platform for the app. Thanks to node's native module system, we can cleanly drop any component we want down to C++, while keeping our main application logic written in the most widely-known (and fastest-executing, thanks to V8) scripting language in existence. I'm happy with this architecture as opposed to starting in C++ and then bolting on some specific, limited scripting APIs.
To be sure, Atom has performance issues that remain, but we're making steady progress on them, and Electron isn't standing in our way at all.
You are absolutely right and that's the biggest irony of all that, them going down to C++ .
What they should have done is like Sublime Text. Write the GUI in C++ then use Javascript as the scripting layer for your apps (instead of Python).
For that matter, even if your app requires occasional core high-performance bits written into C, that's probably still a benefit to you. Similar to the standard Python argument, which advocates a very similar development pattern.
After all, it's not like you're not compiling it on each platform anyway to get the native app you're distributing.
- VSCode is rendering in the DOM what you see, not what you scroll to.
- VSCode is using the correct datastructures, so an insert of a line at the top, doesn't require updating/relayouting all lines below it, but more likely something like log(n) lines.
And these two reasons you can summarize as the difference between old skool engineers with proper training in datastructures, cache behavior and algorithmic complexity -vs- new skool "full-stack developers" that rely on a billion lines of code they haven't written (or understand) and who mainly script a bit in between. The (wrong) assumption in the recent decade was we don't need to train engineers to understand the algorithmic complexity of their code because 'computers will continue to become faster'. That was never true and never will be true, because an exponentially slow algorithm simply won't ever be fast enough regardless of the amount of transistors. And making something like a simple text editor (without syntax highlighting and all of that -- just being able to edit the code), is actually an easy test to distinguish between the two wildly different skillsets.
But I agree that it is mostly typescript through and through, they just have implemented basically everything as a non-blocking promise.
And most importantly, the extension system cannot block the UI. It runs in a completely different process also.
Compare to something like the ACE editor (an OSS editing component that you can plug into any website) which is lightning fast -- it only renders what you see though -- but the filesize is not at all relevant to the performance.
These are all techniques that people who ever wrote complex UI toolkits are incredible aware of. I don't think that describes anybody who worked on ATOM ever, which means they just have to relearn and re invent this stuff until they get it right.
Generally, these days a lot of developers get a lot of experience combining existing technologies. Proper engineering skills, or even being aware of the data structures you are using and their algorithmic complexity, how cache friendly it is -- all of this is prioritized much less now.
So Atom answers a simply question. Has hardware become significantly fast to not care about proper engineering? No, not really and it never will. If your datastructure is structured in a such a way that inserting a line all the way at the top requires a relayout of every line below that, for example, you will run into real limits.
They seemed to have a lot more beta releases than other versions. Perhaps because there were a lot more changes..?
The VIM plugin for Atom is a lot more feature rich than the VS Code version.
This is getting like Windows vs. Mac. Doesn't make any sense.
Let VSCode be more optimized or technologically advanced than Atom like macOS might be compared to Windows, but without making that the reason why people should immediately switch to it.
You know, macOS and VSCode might be better, but there are people who are perfectly fine and more productive on Windows or Atom.
I'm saying "might very well be better"...
Sorry, English isn't my first language.
If you publish a new release and you happen to have a competitor in the same market that is currently eating your lunch people are naturally going to ask what makes it worthwhile to switch.
Sure, but that's not the tone used. Besides a few, most comments are dismissive of Atom and just point out how much better VSCode is and wondering why anyone would use Atom.
It's factions, like Mac vs. PC. There is no productive discussion, here.
Simple answer: Plugins. It'll be the same answer every time this question is asked, for me.
As someone who doesn't see using typescript in the foreseeable future, and doesn't feel impacted by performance benchmark comparisons, VSCode doesn't seem to offer me any compelling reason to switch to it and go through reconfiguring another editor.
For example, VSCode is surely preferred more than Atom by Go developers because of the integration of the tools, Atom has the GitHub integration. And, maybe I am wrong, but I think that Atom has more people hacking it (making plugins and themes) than VSCode.
At this point, VSCode vs. Atom is like VIM vs. Emacs.
What I am saying is that VSCode vs. Atom is the same "war" that people who like to use VIM have against people who like to use Emacs. The people who defend Atom/VSCode do it the same way people defend VIM/Emacs, it doesn't matter if one was built with tiger's blood and the other with wolf's blood, the "war" between them is just an ideology, otherwise everyone would be ignoring one and using the other.
This opens two separate windows, each representing a project. Any editor can do this. Parent meant opening two projects in the same window.
This is the number one reason I do not use VS Code. I love having multiple projects open in the same window at the same time, accessible with cmd+p fuzzy search in Sublime.
This is something I do all the time in atom, and miss quite a bit when using vscode (for typescript).
Actually, that's what I thought when I tried using Sublime Text for a while. It took me hours of editing the JSON file to get it do look and behave like I wanted, while Atom has a very convenient GUI to change settings and install plugins and themes.
When I was finally done, I realized that the project tree view—if that's how it's called—sorts files with folders first like on Windows, and being on macOS it was too confusing for me since that was the only place throughout the OS where that happened.
To me, Atom is the solution to Eclipse's stagnation, Sublime Text's somewhat high price tag (I know we can afford it, I'm just saying), and personal preference, plus really good GitHub integration which for me is paramount.
I wouldn't define myself a uber-geek.
It's 2017, and after two decades of fighting vi and vim at every corner, I am finally a convert. I spent (and still spend) a crazy amount of time getting neovim to behave the way I expect an IDE to behave, but the speed and responsiveness of vim in my terminal and the degree of customization finally, finally made me embrace (neo)vim and see the light, all these years later.
(rust developer life tip: forget racer, it is absolute garbage and ridiculously immature and incomplete. It is eons away from being useful to "code via intellisense" and the list of missing functionality or just simply wrong functionality is longer than the list of things it gets right. Just as I was about to give up on rust code completions, I discovered rls and its mixed racer/rustc approach to completions and haven't looked back. The ide and language-independent nature of the language server protocol and its blossoming implementations for different cilents and different languages is incredible, I wish it all the best.)
I'm wondering—if you prefer VSCode, why even comment a post about Atom? I doubt your care that much..?
Atom is built on Electron. That means that it includes a whole version of Chromium (OMG!), and it isn't even optimized, so its size is 5 times that of VSCode.
Is that really a problem? Are you trying to tell me that as a developer you don't have 400MB to spare on your hard disk for one of—if not the most—important tool to work your job, and the size is really a reason to pick one editor over another?
Atom is about 100 times slower than Sublime Text, and like you pointed out 5 times bigger than the insuperable VSCode.
Now, I use Atom as my main editor, because I find it simpler than others for certain things, and it saves be a lot of time because GitHub integration is done very well. Also, I like the name (can't say the same thing about VSCode).
Some people like Atom because they're more productive, and don't care about its size, super-crappy speed, and whatever else you think Atom is worse than VSCode at.
Can we put this thing to rest..?
And no, I don't think anyone is ready to stop pointing out that Atom is slow. Atom can implement a thousand killer features, but until they fix their performance problem nobody is going to switch back to it.
I tried many editors when I decided which one to use—including VSCode—and Atom was the one where I was the most productive by a long shot.
Speed isn't everything. Atom is quick enough for the code I work on, and in other, much faster editors like Sublime Text I would be less productive and therefore slower. For instance, editing settings/packages in Sublime Text in unnecessarily nightmarish. Changing settings and installing plugins in Atom is a breeze.
Who cares if the editor is a few milliseconds faster when you're many minutes slower..? Just because of its excellent GitHub integration Atom is worth 100 times more than Sublime Text to me (even if it wasn't free).
How so?
So is VSCode.
> Can we put this thing to rest..?
Where's the harm in having an actual discussion about this? If you're comfortable with your choice of Atom, you can just ignore anyone comparing Atom to VSCode.
I don't get the point.
GitHub integration is done very well -- Not nearly as well as the Git integration in VSCode
Also, Atom has in the past been much slower than VSCode in nearly every aspect.
VSCode has a built-in debugger which takes it dangerously close to being called a full-fledged IDE rather than just a text editor with plugins cough Atom cough
The reason they keep getting compared is really simple: they both aim to achieve the same goals, and both use a very similar approach.
One editor I haven't seen mentioned in a LONG while, though, that can probably be considered the 'grandfather' of both of these is Brackets. If I remember right, it had a lot of performance issues, as well.
Is that a bad thing? I like debuggers.
OMG! is right, imagine trying to make sure the zoo of various Node and Chromium versions on your computer do not have any unlatched vulnerabilities.
And you know? I have 400 MB for one Electron app. I even have 8000 MB for 20 Electron apps. I just do not want to give them because you'll eventually tell me that your containerized Electron-on-Docker-on-Electron virtual machine requires 64GB of RAM to run.
Now, I'm not saying that you should not use Electron ever. But if using a TEXT EDITOR on a laptop with 2GB of RAM requires sacrificing a quarter of its resources, that text editor is not a good piece of software. And if you say I should buy an OP max-spec computer to write freaking HTML, you are creating an unnecessary barrier to CS.
So it's valid to ask what did the VSCode people do to come to the different result?
On a related note, I wonder about the speed difference now, after Atom has done a lot of optimizations.
I'm also not convinced the feature set is identical. Atom comes with a lot of language support, customization options, and extensibility out of the box.
It would be like if Honda made a better car utilizing a Mazda engine than Mazda itself.
(I hate iTunes, and have no idea if the Windows version was a better Windows programs than others, I just thought I'd leave this here)
So is VSCode! Hence the constant comparisons.
They have a folder with js modules (I didn't look too deep into it, there might be native dlls there too) that's 75 megs, compressing (and i.e.: recompressing on any change, update, download, etc.) would help with disk space taken and loading times. Not even an SSD will beat a zip file kept in memory, SSD, resolving file paths, NTFS, they still have overhead and I'm sure it'll be more than just decompressing out of a zip in memory.
would beat keeping that zip in memory and accessing it to decompress any script when needed. 75M resources 17M resources.zip 6.7M resources.7z
Third party ones aren't even minified which would be free size savings!
It's basically free saving and super common in game dev to package files and not have them scattered like that.
(edit: the parent comment has been edited. Mine no longer makes sense in context.)
https://pavelfatin.com/typing-with-pleasure/
Without some concrete benchmarks I'm not inclined to go to the trouble of trying it again.
One thing that really surprised me was that my terminal emulator made even things like nano or neovim have high latency.
I suspect that most people don't really care that much about the difference between 30 and 10, but care whenever the latency spikes to 60-70 (which is more likely in VSCode and especially Atom, compared to neovim).
https://github.com/jhallen/joes-sandbox/tree/master/editor-p...
I want to like Atom becuause it's free and open source... but Sublime is so much faster.
Web developer-efficient... But when this goes against the end-user efficiency, I'd prefer the latter one.
SublimeText is written in C++ with the Skia library [1]
It exposes an ABI that you can consume via Python scripts.
It would be nice to not have to disable .git on mounted servers.