Let’s just say that the fact that Electron needs to allocate hundreds of MB in memory to display a single “Hello world” text does not depose in Electron’s favor.
Compare it with the few MBs needed by an equivalent native app with exactly same functionality.
By any standard and by any metric, Electron is bloated. Some applications (like VSCode) can disguise it quite well and give a an acceptable user experience.
Maybe that's because Electron isn't made to just display a single line of text?
Text Rendering, CSS Layouts, Accessibility, being good at cross-platform, Canvas/WebGL and a myriad of other APIs make Electron pretty powerful. I don't know exactly, but I think QT would be it's main competitor when it comes to those features.
But QT isn't always that easy to develop with.
For what is worth Electron could solve all the problem in the worlds. My point is that in order to display rich text, images and basic UI elements (what Notion and for instance Slack need) it requires an abysmal amount of memory with respect to a native implementation.
Your complaint is basically saying "Hey, I don't need this professional workstation just to run Notepad, what is going on in the world?!" while professional workstations are not for running just Notepad, they are for doing a lot more things than that.
Here you are complaining that a "hello world" uses a lot of memory. Yes, that's true, but the use case for Electron is not to display just "hello world", it's to build full, accessible applications in languages who are usually native on the web.
I've been Obsidian since a few weeks and it's the most fastest Electron app I've ever used. It's so snappy, it feels like a native app. So, yes I agree with parent comment, Notion is slow and sluggish but Electron is not the one to blame here. The web version is pretty slow as well.
Apart from the notion (heh) that we should compare a hello world app to determine real world performance, memory usage is really not that relevant to the discussion of speed, responsiveness etc.
There is a level of optimization where that is relevant and it's relevant in a bigger context of responsible resource usage but that's not what we're talking about here.
This was exactly my point as to the "memes" of Electron criticisms, your point is completely off topic but because someone mentioned "Notion" someone has to make your point nearly verbatim every time.
It does not add anything valuable to the discussion. Talking about caching strategies, offline/online functionality and layout thrashing is much, much more interesting here.
Compare it with the few MBs needed by an equivalent native app with exactly same functionality.
By any standard and by any metric, Electron is bloated. Some applications (like VSCode) can disguise it quite well and give a an acceptable user experience.