208 points · by eklavyaa · 9y ago · 141 comments
- built in terminal
- git integration
to just name a few on top of my head
Sublime fell a sleep to be honest. I have a paid for license and I never use it anymore.
- The amazing support on GitHub: https://github.com/Microsoft/vscode/issues
A few weeks ago:
VS Code uses 13% CPU when idle due to blinking cursor rendering
That has not been my experience with any electron app. They are dog slow across the board
I'll stick with emacs for now, until I finish writing my own editor.
VScode shows off a fantastic design by being responsive enough to use, and still using electron for drawing.
It's a great editor, but a lot of us (myself included) care a great deal about latency and performance in a text editor. It's our home, and we like it to be clean and organized.
Kudos to the VScode team for doing such a great job minimizing the headache that is electron, and building a very usable editor, but I'll stick to Emacs for now.
TL;DR: it's not Electron or Javascript which makes editors slow, it's how the code is written.
It would not have been humanly possible to get something like Spotify (we have lists of text and icon-sized images) so resource intensive in any other language.
Now if you want to spend ten (hundred?) times the effort to actually make javascript do something decent I truly hope you get pleasure from that sadistic adventure.
PS: I think Spotify should have simply stayed in the browser, the desktop app is redundant.
https://news.ycombinator.com/item?id=13940014
Edit: Ah a bug. I still hate apps that don't use my OS's native UI controls though; even if you can stomach the inconsistencies in look and feel, you DO most definitely lose out on many features that the OS would give you for free.
That said, I'm also still using Sublime Text / vim primarily because they do feel faster on startup and handle big files well.
But I think rationally it would make sense for me to move to VSCode, because 1) my code editor is almost always open, and 2) I rarely need to edit really large files, and 3) VSCode is plenty fast for pretty much all other use cases and offers a whole bunch of advantages over ST.
Atom I'm less sure of. It seems to get faster every few months that I give it a spin, but it still feels 'laggier' even in normal use, which is definitely a problem for me.
I understand that productivity is important and a significant number of web developers can't seem to learn anything else except JavaScript or worse, don't want to, but such things as professional pride, craftsmanship and excellence do exist and are very appreciated.
Those things represent the opposite of building software applications in JavaScript. I don't know why others criticize such apps, but that's why I do it: they are normalizing flawed software and a lousy experience and mixing it with extreme arrogance.
I've had this deep disagreement with various people ever since web apps were invented. The best of the best of these apps sucked then and they still suck now and are a waste of everybody's time.
I just opened a 9.75mb JavaScript file in VS Code and it edits it quite well. It syntax highlights the top of the file immediately, and it does take quite a while for the highlighting to work its way down the file (I'd say about 20 seconds). But as far as editing goes, you can jump anywhere in the file and edit without any hesitation, instantly.
Otherwise, there really isn't any reason why I should care what tools you use.
Also, calling it Visual Studio is very deceptive. Most devs know VS to mean something completely different.
I'm not using VSCode to edit one-off files from my terminal. The use case is for your folder-based projects. I generally open it once/week or reboot, etc, and finds it loads, mounts my folder and I'm done in the amount of time it takes me to grab a sip of coffee.
I think too many people base speed because they're used to one-off editing files directly from their filesytem. At this point in time, I only do this when editing config on remote servers and such.
EDIT: I just went and opened VSCode from my terminal and it took about 3.5 seconds to load up an entire React Native project on a three year old 11" MacBook Air.
VS Code actually loads faster, doesn't freeze as much, and in general runs faster than any IDE I've ever used. And I've used a few. There are faster code editors, but VS Code is a bit more than most of them, but less than a full IDE typically is.
VSCode has found a place in my workflow now and I don't care what language or platform they've used. It's proven to be more full-featured than competing editors and they are improving it much faster than other editors (based on my completely non-scientific, possibly biased observations).
Yeah I do share that question with you and would love an answer from the team!
> Also, calling it Visual Studio is very deceptive. Most devs know VS to mean something completely different.
Could you clarify what you mean with that? Accusing me of being 'deceptive' seems a bit unwarranted and disproportionately antagonistic, considering that as far as I can tell I've made a clear distinction between VSCode and VS (meaning Visual Studio proper), and considering that I can't think of any reason why I would choose to deceive in this matter. Where did I go wrong?
Now that I've had that experience, I know it's not for me, but I can understand when a tool like Java makes sense.
JavaScript vs anything else is not the same as C++ vs Java, because JavaScript is not an effective technology to build software applications in. It never was and likely won't become one.
It has a weak type system and non-existant standard library. Must be run in a packaged browser. Anything UI-related must be done by using a document markup language and style sheets. The fact that any app developed in it is guaranteed to be inefficient and sluggish is just the cherry on top.
Dynamic typing is useful. The "native" Objective-C is dynamically typed, for example. Static typing is useful too. If history has shown anything, it's shown that both dynamic typing and static typing have their places, and trying to argue that one is superior to the other in all circumstances is one of the most boring arguments imaginable.
> non-existant standard library
This is more or less a deliberate design choice, because there are many implementations of JS and that multiplies the probability of incompatibility. Consider the headaches that have arisen between Microsoft's STL and GNU's STL...
> Must be run in a packaged browser
Node? This is obviously false.
> Anything UI-related must be done by using a document markup language
It's an effective retained mode tree of nodes, with a whole lot more optimizations than any native toolkit I know of. (Look at how the childNodes array is implemented sometime, for example; no native toolkit does the kind of caching that browsers do...)
> style sheets
Style sheets are a great idea. They're becoming increasingly popular for native development nowadays (Qt, GTK, etc.)
> The fact that any app developed in it is guaranteed to be inefficient and sluggish is just the cherry on top.
I'm as much of a critic of current browser design as anyone, but this is mostly the fault of old browser designs. The Web platform has a lot more potential for performance than things like the Win32 API, as I've elaborated on in many other posts.
Dismissing it for performance reasons is a fool's errand. The performance issues are fixable and we're already seeing them get fixed.
Bold prediction - JavaScript(or rather, a future incarnation of it resembling es7/es8) will be the lingua franca for all platforms(web, desktop, and mobile) within a decade.
HOWEVER, I have several times seen it get into a state where it's unusably slow. As in, type a character, and it shows up 500 ms later. Now, maybe this is a bug that can be fixed. Or, maybe it's a fundamental problem with trying to make an app that forces you to effectively work in a VM, all the time.
Anyway, I still wouldn't have believed, 5 years ago, that a JS/HTML/CSS app in a browser could be so snappy, overall. Maybe it's just a matter of time before perf is great across the board. Or, maybe, like heap-walking GCs, they will always be fundamentally prone to pathological cases, because the whole idea was fundamentally flawed from the start.
Either way, Atom/VSCode have developed a large following which encompasses lots of talented and smart people. They both cannot be completely summed up with the description "slow and clunky." They are absolutely not perfect, but if you really cannot see any of the many reasons people use them, you're being left behind and I strongly suggest you refrain from commenting.
That's an interesting claim, given that Visual Studio (not VS Code) is native through and through and still it's orders of magnitude slower to work with on any sizable code-base compared to the "slow" editor VS Code.
It's almost as if you could say that on modern hardware the architecture of the application dictates overall performance much more than the technology used to implement it.
But yeah, that would certainly be madness, so let's not go there, eh?
But VS Code first and foremost uses a web-browser for UI. How much does the choice of a UI-technology really constrain the rest of your application and its architecture?
I would argue that with a good architecture, the choice of UI-platform should place near zero effective constraints on the rest of your application, how it's structured and how it performs. It should certainly not be a critical component of your overall design, it should be an implementation detail.
Are you arguing otherwise? Can you come up with some concrete examples where the choice of UI-library causes troubles other places in the application? If not, it seems you're more or less agreeing with my original statement.
And as such, I don't see any fundamental problems using a web-browser in a text-editor.
Those IDEs are all much slower in my experience, and even Sublime is outmatched in terms of plugins. Because it's just so damned accessible with VS Code. If it runs good enough on the hardware you're using, wtf does it matter?
Note: native means the platform's native toolkit, running with the best performance on that platform. E.g: Java or C and C++ for Android, C and C++ for Linux, C and C++ and Obj-C for macOS, C and C++ for Windows, etc.
Things that are not native: Python, .NET, Xamarin, JavaScript, Java on anything except Android, etc
It's changed my opinion of electron based programs.
The integrated terminal is far and away my favorite feature, second would be the git+diff integration... though merging/rebasing needs a good story.
Once technologies like Servo and Web Assembly become part of the standard platform, it will be the preferred platform for performance reasons. There will likely be nothing that can give you the same performance and also be cross OS platform.
The only thing that is really incompatible is Windows, and Microsoft working hard to make that less and less true.
Servo will be a drastic improvement, though.
Turns out VS Code is actually surprisingly fast! Startup time is only marginally slower than notepad (and I have several plugins added), and performance when running for things like search and replace is super fast. Try it, it will surprise you.
The parent comment was talking about Visual Studio itself, not VS Code.
Also, stripping down Visual Studio to be cross-platform isn't an easy task.
1. It's WPF and hence depends on Windows only components.
2. It's a lot of C# which covers some assemblies not provided by .NET Core yet.
3. The codebase itself is over 20 years old at this point.
It's not leaving windows. I'm guessing it would be easier to grow vs code into a "full" platform independent IDE than it would be to strip VS into a platform independent VScode equivalent.
[1]: http://www.itorian.com/2013/11/visual-studio-online-monaco-e...
I'm not experienced with projects as large as this, but I could see how the work they're doing on VSCode would be worthwhile even if they eventually swap the web-based parts with more performant approaches (as the project expands to 'become' VS).
At this point, they actually have a lot of the core functionality in place for a full IDE, they just need a prettier means of editing configuration, and creating build-able projects.... It's a bit manual at this point, which makes it a good fit for node and go workflows, and decent for others.
It will get better.
If I have some time for another exploration I will take another look at VSCode and diving in WebStorm.
1. https://code.visualstudio.com/blogs/2016/06/27/common-langua...
I guess they have a reason for keeping it that way, although if such a typo exists unfixed in the codebase, that gives you a general hint of the overall codebase quality.
On a more serious note, Microsoft is one of the biggest software companies. It also consistently delivers high quality products to its customers. Products of incredible complexity such as Windows, Office or .NET. They couldn't do that without good engineering practices.
And specifically in this case, the Visual Studio Code team wouldn't be able to deliver very complex features so often if their code quality and overall engineering wasn't solid.
Have you ever read any of their release notes? Have you noticed the frequency of their releases?
Those alone should make you ponder for a while ;)