5 ms·
Did you actually give VSCode a try before making such statements? I use both (neo)vim and VSCode (with vim key bindings, sacrilege!) daily. Vim starts up faster
by flohofwoe 10y ago
Did you actually give VSCode a try before making such statements? I use both (neo)vim and VSCode (with vim key bindings, sacrilege!) daily. Vim starts up faster (vim is instantly vs about 1 second for VSCode), but once you're in the editor it depends what you do in it. For instance the standard python syntax highlighter in vim is much slower in vim for files with a few hundred to a few thousand lines of code compared to VSCode. Setting up a C++ dev environment and debugger via vim plugins is hit and miss, in VSCode it's just a few seconds to install the extension, and step-debugging is snappier then in 'native tools' (e.g. Xcode).
TL;DR: it's not Electron or Javascript which makes editors slow, it's how the code is written.
- tjoff 10y ago"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.
- flohofwoe 10y agoI don't know, writing extensions for VSCode in Typescript is actually quite pleasant. Sure it would be better to have a super-performant, super-small, cross-platform runtime environment. But what would that be? Qt? Java? .NET? Or another roll-your-own UI kit? PS: I think Spotify should have simply stayed in the browser, the desktop app is redundant.
- tjoff 10y agoWhy not Qt? And, since this is Microsoft, why not take this opportunity to develop the backend in .NET core. But I yes the biggest impact javascript will have on mankind is that noone will ever be bothered to create a good foundation for cross platform applications. The desktop app is absolutely paramount for Spotify to stay relevant. Not sure if I've seen or heard of anyone using it in the browser (not that that is relevant, but I'd stop using it the very second I can't use it as a standalone app).
- roblabla 10y agoBecause Qt is a huge library. And it's not even really native outside of Linux KDE (though it's the closest we'll get cross-platform wise).
- Johnny_Brahms 10y agoI don't want to be a part of the anti-electron crowd,but for something like a text editor qt will most certainly be smaller than electron.
- mixedCase 10y agoIt is huge, but so is Electron. It's as native as it gets, it imitates native widgets perfectly and allows the designer to easily recreate every element of a particular OS' HIGs with the use of stylesheets and native code. In before "doesn't look native in my macOS": Because the people writing in cross-plat tools usually don't care about getting every detail right, they just want their app to run well everywhere. But Qt does allow the developer to nail those details without too much effort if he actually cares. The only problem with Qt is C++.
- roblabla 10y agoBeen doing some research about my problems with qt. I found some interesting stuff. In qt6, there will be "native components" that use the actual underlying OS widgets[0]. They'll be less stylable, but will integrate better with the native look and feel. That should take care of the annoying cross-platform problems. The other problem left is how big it actually is. As it turns out, it's possible with the LGPL to statically link your program and still comply with the license[1]. Basically, you just need to provide a way to download the .o files so they can be relinked against a different version of Qt. Thanks to this, it should be possible to create (relatively) lightweight, statically-linked binaries of Qt software. As far as the C++ is involved... There are qt bindings for just about every other language out there. Just today, bindings for go were released[2]. The future is bright for qt and cross-platform apps. [0] http://blog.qt.io/blog/2017/02/06/native-look-feel/ http://blog.qt.io/blog/2017/02/06/native-look-feel/ [1]: https://news.ycombinator.com/item?id=4302517 https://news.ycombinator.com/item?id=4302517 [2]: https://news.ycombinator.com/item?id=14068525 https://news.ycombinator.com/item?id=14068525
- z3t4 10y agouse a stepping debugger to see what it does. then remove stuff that dont add value.
- derefr 10y agoIs Spotify's resource-intensiveness due to things it's actively doing in Javascript (i.e. a lot of procedural code running all the time), or is it due to things it sets up the DOM to do (i.e. a really complicated page that the renderer chokes on)?
- Razengan 10y agoVS Code uses 13% CPU when idle due to blinking cursor rendering https://news.ycombinator.com/item?id=13940014 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.
- flohofwoe 10y agoThat was fixed a few days later with the March update: https://github.com/Microsoft/vscode/issues/22900 https://github.com/Microsoft/vscode/issues/22900
- maccard 10y agoThat was a bug and can easily happen in native software too.
- hashhar 10y agoAnd the biggest point is, it was a Chromium bug. Recently the Chromium team also breaked special keys (Home, PgDown, PgUp, End, Insert etc.) over RDP which caused a lot of issues for people using VSCode.
- Rapzid 10y agoWow, how do you even break keys over RDP from inside your app?! Do you have a link; I'm curious about the root cause. Some here may recall that early VS Code had a but where drag to highlight and menu option highlighting on mouse-over was busted in Virtual Box. So crazy and also a chromium bug.
- hashhar 10y agoThe issue contains a link to the related Chromium bug where I think you can follow up. https://github.com/Microsoft/vscode/issues/24107 https://github.com/Microsoft/vscode/issues/24107 I don't know for a fact that it is RDP but it's the common factor among other people with the same issue.
- abrkn 10y agoI switched from Atom to VS Code a few weeks ago and find VS Code's performance to be excellent. Haven't used Atom since.
- dolzenko 10y agoAny idea on what exactly VS Code did better to achieve that performance compared with Atom?
- killercup 10y agoPlugins don't run on the UI thread IIRC
- Rapzid 10y agoYou do. They also have some really smart people(I'm assuming more than one, but at least one has posted on HN about editor optimizations they have made) who seem to pull out all the stops on monaco to produce a very fast "smart" text editor. Lots of good architecture decisions made. The marriage with TypeScript has also worked out well; it's on fire and coffee is smouldering. This helps with getting people to jump in and contribute.
- swozey 10y agoWere you a heavy Atom plugin user? I'm afraid I'll leave and all of the great plugins won't convert.
- F2 10y agoWhich plugins?
- andrewguenther 10y ago90% of my Atom plugins were built-in for VSCode. * Terminal built-in * Sublime style Alt-O for header file switching * Minimap * Javascript/Typescript support made a lot of my plugins obsolete I have language plugins installed for Dockerfiles, protobuf, and a few others, but VSCode felt really complete out-of-the-box. I didn't feel the need to install a ton of plugins to make it useable like I did for Atom.