Discussing why Visual Studio Code performs better than other Electron apps

I think it’s not flawless. However, when comparing it to other Electron apps like Slack or Notion, the performance and optimization aren’t as good.

VSCode manages multiple tabs with thousands of lines of code without much fuss. So why are some simple pages in Notion slowing everything down?

I’m not a web developer, but I’ve always felt the issue lies with Electron itself, which isn’t fine-tuned for operating systems the way native apps like those built with dotnet or swift are.

The key is to make sure it stays responsive.

Web applications are generally quick, and adding unnecessary features slows them down.

VSCode takes some smart steps forward by speeding up start times by baking the V8 context beforehand, but that’s not the first thing to focus on.

Look at Progressive Web Apps - on my device, they often boot faster than native ones, except in cases where they are intentionally limited like Twitter/X.

Even though I dislike Electron, the performance relies on the version of Chrome in the app and the developer’s skills in creating the Electron component. You can find fantastic Electron apps, terrible ones, and everything in between.

Each one is different.

It’s really not that fast; many other apps are just poorly coded and prioritize performance less.

Lennon said:
It’s really not that fast; many other apps are just poorly coded and prioritize performance less.

What kind of computer are you using? I’ve never experienced any lag or issues with VS Code.

@Raleigh
The computer isn’t the issue. Casey Muratori explains this thoroughly.

Check out this video where he shows an old version of Visual Studio from 2000 runs faster on an old computer than modern software. It’s pretty damning.

@Raleigh
Then maybe you just type slowly or haven’t used a real text editor.

Lennon said:
@Raleigh
Then maybe you just type slowly or haven’t used a real text editor.

I’ve tried many, and VS Code works fine. Sublime Text is great, but the benefits of VS Code and its community make up for any performance dip…

Lennon said:
@Raleigh
Then maybe you just type slowly or haven’t used a real text editor.

True.

@Raleigh
I agree that it’s not about the hardware. I often notice some sluggishness in VS Code compared to PyCharm, for instance.

VSCode is primarily written in vanilla JavaScript, while other Electron apps often rely on major web development frameworks. That might be a big reason why.

Here’s a video explaining it: check it out

@Mica
Are you saying that applies to every single one?

@Mica
Absolutely. Microsoft has the resources to optimize VSCode effectively. I can’t find the article now, but it was an interview with someone from the VS Code team discussing how they switched from React to vanilla JS web components, using a library from Microsoft called fast web components.

@Haru
Microsoft also built Teams using Electron, and that app is terrible.

Variants of IDEA can be better suited for some languages.

One advantage is that it’s open source. I imagine many who contribute to VSCode also help with the Electron framework and have considerable experience with performance improvements.

Performance issues are a common critique of JavaScript, especially from those who truly care about the language. Debugging and optimization are difficult, and JavaScript is a tricky language to learn. You often need to figure out how to work around its quirks more than mastering what makes code run efficiently.

Let’s not exaggerate. It’s okay but it’s had plenty of issues in the past that the developers have worked hard to solve.

Check out this issue

I can’t find it right now, but I remember an article when VS Code launched discussing its innovative way to load text chunks from large files without bringing in the whole file at once. I think this commitment to efficient performance and load times has been consistent throughout various updates since the project’s start.

Maybe it’s this one: text buffer reimplementation

Microsoft has a history of being developer-friendly and maintaining high standards in their software, so this shouldn’t be shocking.

Kiran said:
Microsoft has a history of being developer-friendly and maintaining high standards in their software, so this shouldn’t be shocking.

Have you tried Teams or Outlook recently?