News for hackers. Stuff that matters.
Re:How VSCode made bracket pair colorization 10,000x faster by vbezhenar on Thursday June 22, 2023 @11:52AM (#36434088)
That's surprising to hear, because I use vscode every day and its performance is miles away of any JS apps I've ever used. It truly feels like a native app when it comes to performance, at the same time keeping some "fluidity" of web app (like scale the entire UI with single key press or reloading the entire app like a web page).

I'd say I never had issues with vscode performance and actually its performance is a major factor why I use it.

Re:How VSCode made bracket pair colorization 10,000x faster by bamfly on Thursday June 22, 2023 @12:08PM (#36434338)
It's better than other Electron programs (a low bar, since most of those perform shockingly poorly) but eats way more system resources and performs noticeably worse than Sublime Text, on my machine.
Re:How VSCode made bracket pair colorization 10,000x faster by wiseowise on Thursday June 22, 2023 @02:18PM (#36436465)
Oh noes, who could’ve thought that application written in JavaScript that gets executed on browser engine is slower than lean C++ that uses their own custom GUI toolkit http://news.ycombinator.com/item?id=2822114.
Re:How VSCode made bracket pair colorization 10,000x faster by VHRanger on Thursday June 22, 2023 @02:35PM (#36436727)
Sublime text is an editor, VS Code is an IDE, though?

The featuresets aren't the same.

Re:How VSCode made bracket pair colorization 10,000x faster by bamfly on Thursday June 22, 2023 @03:10PM (#36437178)
I'd say they compete in a similar space of smart plugin-friendly code editor, not IDE.

What are you thinking of, in terms of differences? I use both quite a bit (some of VSCode's plugins are better) and have always viewed them as very close to one another, in terms of features.

Re:How VSCode made bracket pair colorization 10,000x faster by tredre3 on Thursday June 22, 2023 @03:28PM (#36437440)
For one thing VS Code has a full debugger with breakpoints and stack analysis that supports many backends out of the box, that's an IDE feature.

Sublime doesn't have any (real) debugger even with plugins. Some attempt to tack on a debugger but they have to do so via popup menus or overloaded "magical" text buffers and it's atrocious. Why can't I click on the line I want to break on? Why can't I see the stack in a nice editable tree? Right, because sublime is a text editor and VS Code is an IDE.

Re:How VSCode made bracket pair colorization 10,000x faster by bamfly on Thursday June 22, 2023 @03:43PM (#36437673)
Ah—I'd never noticed VSCode could do that, in years of using it. I ignore some of its features (some of which Sublime also has, and I tend to ignore them there, too) because I find them janky and fragile or requiring-configuration such that I lose a lot of time keeping them happy, like any kind of run-from-editor stuff and the built-in terminal (it always seems to have a messed-up environment or get itself into broken states) dropping to a separate terminal for that sort of thing. Not like when I'm, say, working in XCode or Intellij and almost exclusively run, build, & debug from inside the IDE, rarely touching a separate terminal.

Guess you've got a point, then, and I just don't use it that way.

Re:How VSCode made bracket pair colorization 10,000x faster by sebzim4500 on Thursday June 22, 2023 @12:04PM (#36434274)
For the most part I agree with you but "miles away of any JS apps" is a low bar to cross.
Re:How VSCode made bracket pair colorization 10,000x faster by akkad33 on Thursday June 22, 2023 @12:16PM (#36434461)
I use vs code and jet brains intellij. Vscode is by miles more stable and light weight for running a java spring app. Of course intellij runs a lot of stuff but the experience is not better for it. Intellij feels like a sloth next to vscode
Re:How VSCode made bracket pair colorization 10,000x faster by pcl on Thursday June 22, 2023 @12:26PM (#36434601)
Make sure you’ve got your IJ memory settings tuned right. I assign 8GB rather than the default (2?).

Also, if you’re on a Mac — there’s an Apple Silicon build that is noticeably better.

Re:How VSCode made bracket pair colorization 10,000x faster by nickelpro on Thursday June 22, 2023 @12:58PM (#36435205)
> I assign 8GB rather than the default

This is not a good argument in a thread where the central claim is that VSC is a resource hog but other IDEs aren't

Re:How VSCode made bracket pair colorization 10,000x faster by uoaei on Thursday June 22, 2023 @12:38PM (#36434807)
Yeah this sounds like a misconfiguration. We've already forgotten that native apps tend to require a bit more fine control on how they use resources, all in the name of the cult of portability.
Re:How VSCode made bracket pair colorization 10,000x faster by akkad33 on Thursday June 22, 2023 @04:01PM (#36437983)
How do I configure it right? One good thing about vs code is it works well out of the box with almost zero custom configuration
Re:How VSCode made bracket pair colorization 10,000x faster by marginalia_nu on Thursday June 22, 2023 @01:03PM (#36435288)
IntelliJ is not very fast by any benchmark. I mean it's based on Swing!

C++ based editors like Kate blow both VSC and IJ out of the water. Runs so fast it feels janky, like the computer isn't doing anything.

Re:How VSCode made bracket pair colorization 10,000x faster by akkad33 on Thursday June 22, 2023 @04:00PM (#36437941)
I haven't heard of Kate. I'll try it out
Re:How VSCode made bracket pair colorization 10,000x faster by marginalia_nu on Thursday June 22, 2023 @04:10PM (#36438138)
It's from the KDE project, and while it's portable, but I can't speak for how well it looks on other platforms.
Re:How VSCode made bracket pair colorization 10,000x faster by troupo on Thursday June 22, 2023 @01:53PM (#36436081)
IntelliJ has a lot of legacy code, including custom re-implementation of all things UI.

And it offers vastly more features than VS Code.

Re:How VSCode made bracket pair colorization 10,000x faster by 5e92cb50239222b on Thursday June 22, 2023 @02:12PM (#36436352)
It also does maybe a quarter of what IDEA can do. Let's see how it performs when it catches up to what IDEA does right now (maybe in another ten years).
Re:How VSCode made bracket pair colorization 10,000x faster by akkad33 on Thursday June 22, 2023 @04:08PM (#36438102)
It does everything I need to run to do my job. If intellij is doing more stuff that is slowing it down then maybe they can find a better performance-feature trade off by getting rid of the bloat
Re:How VSCode made bracket pair colorization 10,000x faster by 5e92cb50239222b on Friday June 23, 2023 @01:25AM (#36443133)
It would turn into another run of the mill text editor like VSCode then, and would lose most of its users.
Re:How VSCode made bracket pair colorization 10,000x faster by akkad33 on Friday June 23, 2023 @01:05PM (#36449577)
Vs code is not a run of the mill editor though. It can be configured to support all useful features of intellij. Even then it's faster than intellij
Re:How VSCode made bracket pair colorization 10,000x faster by mrweasel on Thursday June 22, 2023 @12:32PM (#36434701)
Why is it that VSCode is the only good Electron app? I get that Microsoft have talented developers, but so does other companies, yet VSCode remain the single application that shows that Electron apps can work.
Re:How VSCode made bracket pair colorization 10,000x faster by sirwhinesalot on Thursday June 22, 2023 @12:41PM (#36434877)
Even though it is based on web tech and Electron, VSCode cares about performance, while garbage like Microsoft Teams does not. That's about it.
Re:How VSCode made bracket pair colorization 10,000x faster by CharlesW on Thursday June 22, 2023 @12:37PM (#36434780)
Also, Figma.
Re:How VSCode made bracket pair colorization 10,000x faster by pcthrowaway on Thursday June 22, 2023 @01:13PM (#36435465)
Obsidian also
Re:How VSCode made bracket pair colorization 10,000x faster by esafak on Thursday June 22, 2023 @02:55PM (#36437001)
I think WebAssembly might play a role there. https://twitter.com/mattrickard/status/1410714002456383490
Re:How VSCode made bracket pair colorization 10,000x faster by IceSentry on Thursday June 22, 2023 @01:34PM (#36435771)
I use discord and gitkraken every day and I've never had any issues either. People just like to complain. They act as if using a few hundred megabytes for the main app you are using is an issue. It's not the 90s anymore ram is cheap, especially at those amount.
Re:How VSCode made bracket pair colorization 10,000x faster by xigoi on Thursday June 22, 2023 @01:43PM (#36435905)
Why is it better to have a million people buy more RAM, creating a large amount of electronic waste and emissions, instead of putting some effort into not unnecessarily wasting resources?
Re:How VSCode made bracket pair colorization 10,000x faster by IceSentry on Friday June 23, 2023 @03:55AM (#36444043)
You don't need to buy more ram. It was already cheap a decade ago. Ram has been in the multiple gigabyte range for longer than that. Having an app that you use all the time every day use a few hundred of the otherwise unused ram is perfectly reasonable.
Re:How VSCode made bracket pair colorization 10,000x faster by EMM_386 on Thursday June 22, 2023 @02:00PM (#36436182)
> It's not the 90s anymore ram is cheap, especially at those amount.

I just wrote the exact same thing in another comment.

That's what the problem is ... it's the old timers complaining that things aren't native, thus they are RAM hogs and are slow by default. Even if they are fast, they are "slow and bloated" just because it's the gut reaction when you have layers on layers of other stuff over native code.

And I'm an old timer but I am not complaining. I love VS Code and I think it's blazing fast for what I need it for, a large Angular enterprise application.

Re:How VSCode made bracket pair colorization 10,000x faster by 5e92cb50239222b on Thursday June 22, 2023 @02:15PM (#36436405)
Or maybe you're just fine with throwing away thousands of dollars at it every few years, so you're not seeing the problem. The "solution" that most of the world simply cannot afford.
Re:How VSCode made bracket pair colorization 10,000x faster by whynotminot on Thursday June 22, 2023 @02:31PM (#36436661)
If I could roll my eyes any harder, they’d be spinning.

99.9% of people who complain about electron apps are not ardent defenders of third world computing. It just violates their sensibilities.

Re:How VSCode made bracket pair colorization 10,000x faster by 5e92cb50239222b on Friday June 23, 2023 @01:21AM (#36443103)
I am not one of those "99.9%" (seems like a random number pulled out of someone's ass). Most developers in my poor country don't make much and would quality as lower-middle class in yours. Including a good friend of mine, who is learning web development on a 10-year old laptop — he can't afford anything else. I know he struggles with VSC because I hear about it daily.
Re:How VSCode made bracket pair colorization 10,000x faster by whynotminot on Friday June 23, 2023 @09:26AM (#36446539)
I feel for your friend, and I hope he gets some better hardware solutions soon.

But I think it’s unfair to hold developer tools back to 10 year old specifications.

Re:How VSCode made bracket pair colorization 10,000x faster by wiseowise on Thursday June 22, 2023 @02:22PM (#36436524)
Of cut it off with most of the world bullshit, we’re talking about development tool here, not solving world hunger.
Re:How VSCode made bracket pair colorization 10,000x faster by 5e92cb50239222b on Friday June 23, 2023 @01:22AM (#36443113)
There are no developers outside Silicon Valley, got it.
Re:How VSCode made bracket pair colorization 10,000x faster by wiseowise on Friday June 23, 2023 @02:00AM (#36443341)
Right, because world is divided in Silicon Valley and third world hellholes.
Re:How VSCode made bracket pair colorization 10,000x faster by esafak on Thursday June 22, 2023 @02:53PM (#36436971)
People act as if their precious app is the only one a user is going to run and has the right to hog all the memory and CPU.
Re:How VSCode made bracket pair colorization 10,000x faster by troupo on Thursday June 22, 2023 @01:55PM (#36436104)
> Why is it that VSCode is the only good Electron app?

Because you need to sink hundreds of thousands of man-hours into making it work.

And fight against web tech most of the time you're doing that.

Re:How VSCode made bracket pair colorization 10,000x faster by fragmede on Thursday June 22, 2023 @12:05PM (#36434304)
What CPU do you have? Because even though VSCode is "just" a text editor, I've found it's relatively demanding. A Core 2 Duo, which is admittedly a little old, but which does absolutely fine with vim, is slow to the point of being unusable with VSCode.
Re:How VSCode made bracket pair colorization 10,000x faster by bick_nyers on Thursday June 22, 2023 @12:27PM (#36434614)
I think unfortunately a CPU from 2008 just isn't gonna cut it here. Single thread benchmarks core for core have risen about 4x since then, average core counts have risen 4x, and L3 caches were added. Probably SIMD instructions are a consideration here as well.

That being said I'm a huge fan of prioritizing longevity of computer parts versus constantly upgrading and generating e-waste.

Re:How VSCode made bracket pair colorization 10,000x faster by wenc on Thursday June 22, 2023 @12:21PM (#36434522)
I used to run vim and VS Code on a Core 2 Duo from 2005. Vim is a lot faster but VS Code is so much more powerful — it’s a full featured IDE. It’s not a quick and dirty text editor like Kate. It’s not meant to be that. I still use vim to edit config files but for everything else I use VS Code.

I’ve since upgraded to a 2014 i7 and now VS Code feels fast.

Re:How VSCode made bracket pair colorization 10,000x faster by CalChris on Thursday June 22, 2023 @12:56PM (#36435177)
I use VSCode NeoVim and clangd. This has gotten so good, although command mode took awhile, that I rarely need to use a terminal vim.
Re:How VSCode made bracket pair colorization 10,000x faster by ColonelPhantom on Saturday June 24, 2023 @06:07AM (#36457268)
Kate is not a "quick and dirty text editor" either? Kate has session and project support (admittedly a bit more clunky than VSCode, but it works), good LSP support, decent built-in search, GDB integration, a built-in terminal, Git integration, etc. Sure, it may be less polished than VSCode in some of these aspects, but they're there and mostly just work.
Re:How VSCode made bracket pair colorization 10,000x faster by vbezhenar on Thursday June 22, 2023 @01:02PM (#36435280)
Apple M1 Max.

I understand that everyone's situation is different, but I live in a poor country, making like $2k/month and still consider investments into my computer worthwhile, so I never tried to save money on it. This is american website, so most people here surely can afford fast computer for their work.

Re:How VSCode made bracket pair colorization 10,000x faster by zenapollo on Thursday June 22, 2023 @01:28PM (#36435672)
I’ll bet a lot of this whole argument is just windows v mac. VS code is snappy on Mac, much less so on my windows machine.
Re:How VSCode made bracket pair colorization 10,000x faster by stewartmcgown on Thursday June 22, 2023 @11:58AM (#36434197)
VSCode was essentially unusable for me on large projects. We're talking thousands of source files and god knows how many node_modules entries. Things like Go to Definition would regularly take 15+ seconds! Switched to WebStorm recently and have been very happy with the performance.
Re:How VSCode made bracket pair colorization 10,000x faster by chii on Thursday June 22, 2023 @12:04PM (#36434275)
it's quite likely that your issue is with the actual node_modules directory being referenced as part of your source. It slows the LSP too.

Exclude it (via https://code.visualstudio.com/docs/getstarted/settings) by using

  "files.exclude": {
    "**/.git": true,
    "**/.svn": true,
    "**/.hg": true,
    "**/CVS": true,
    "**/.DS_Store": true,
    "**/Thumbs.db": true,
    "**/node_modules" : true
  }
I've not had any issues with speed ever since i started excluding directories that contain junk stuff that you know you will not ever need to see in a project's view.
Re:How VSCode made bracket pair colorization 10,000x faster by wongarsu on Thursday June 22, 2023 @12:54PM (#36435142)
If you have large files (as in hundreds of MB or bigger) in your project directory, especially text files, it also really pays off to put them into either your .gitignore or the files.exclude.

Often happens to me when I run projects that output large CSVs, and it's a very notable performance impact.

Re:How VSCode made bracket pair colorization 10,000x faster by vbezhenar on Thursday June 22, 2023 @12:08PM (#36434342)
Today I worked with not-so-large project: 255 typescript files, 26K LoC, 920 modules in node_modules, 29351 js/ts files total (with node_modules), 4.5M LoC total. I just checked and go to definition works pretty much instantly.

Anyway go to definition is a function of LSP server, AFAIU. I understand that it's bundled with vscode and feels like a single product, but still I'd separate vscode and LSP servers and judge them differently.

Re:How VSCode made bracket pair colorization 10,000x faster by Shrezzing on Thursday June 22, 2023 @12:06PM (#36434316)
>We're talking thousands of source files and god knows how many node_modules entries.

I think most VSCode features are disabled for node_modules directories by default.

At a guess, I'd say re-disabling that in your workspace file would resolve all of your performance issues. For even simple projects you'd be including hundreds of MB of text files, and thousands of subdirectories.

Re:How VSCode made bracket pair colorization 10,000x faster by bemusedthrow75 on Thursday June 22, 2023 @12:36PM (#36434773)
They are indeed -- and it will avoid similarly costly stuff on anything you .gitignore.
Re:How VSCode made bracket pair colorization 10,000x faster by asdajksah2123 on Thursday June 22, 2023 @12:37PM (#36434782)
VS Code has stopped opening for me for certain codebases. And to be honest, these codebases aren't even that large.

I also have 0 extensions installed :(

VS Code used to be my quick and dirty IDE when I didn't want to open something heavier, but it's gotten so much more painful than even a couple of years ago.

Re:How VSCode made bracket pair colorization 10,000x faster by lfkdev on Thursday June 22, 2023 @12:02PM (#36434246)
Weird, i often opened files with hundreds of thousands of code lines without any problem. We do have very modern Workstations at work though.