3 ms·
> most Electron apps are slow, laggy, and 100+ MB. Yes, because it's common in (Node)JS land to add many dependencies. I guess MS simply coded most of the stuf
by k__ 10y ago
> most Electron apps are slow, laggy, and 100+ MB.
Yes, because it's common in (Node)JS land to add many dependencies. I guess MS simply coded most of the stuff on their own, which keeps the size low.
Also, they use TypeScript and I heard that it reduces function polymorphism, which can increase performance (but I don't know how much). Also, as far as I know, VSCode runs plugins in different processes, which makes the main process snappier.
- smt88 10y agoTypeScript generates readable JS that is as close to the TypeScript source as possible. It doesn't do optimizations that I know of.
- k__ 10y agoI know that. But I heard that the static typing (implicitly) leads devs to write more monomorphic functions, which seem to be much easier to optimize by the JavaScript-VMs. But yes, you can write such code in JavaScript yourself. The thing is that writing polymorphic stuff is a bit more effort in TypeScript, if you don't want to throw 'any' around everywhere.