That is true and as a user of Sublime myself, I agree. However, VSCode is still a JS app that has to do its computation on a single thread, on a largely interpreted language.
If you do it the way I do and use Electron as a skin / thin client to a compiled binary within the package, you remove that bottleneck. That way, you get both cross-OS capabilities, a familiar UI toolkit (JavaScript, I use Vue) and native binary speed and real multi-thread capabilities.
JS doesn’t have to do computation on a single language. Web workers an option, and I believe Node has additional tools as well.
It definitely can’t compete with true threads for work that needs true threads, but you probably don’t have much work that needs true threads (rather than just workers and channels).
I really hope this is the sort of thing products like VSCode will start turning to WASM for. Performance is their Achilles heel for the time being even though they’ve done a relatively good job considering.
A couple of things here. WASM isn't necessarily more performant than vanilla JS. For the web, it'll open the door to the JS engine as a compile target, and that's great.... but it's still not super fast.
Secondly, in the case of an application, WASM is of little use since (with node and almost any programming language) you have an FFI available. One could simply shell out computationally heavy things to C++ or whatever else. This is what many folks do with their Electron apps already (via node-ffi).
That would be helpful. Go can compile to WASM natively, so if I could just compile it down to that, I wouldn't even have different Go binaries for different platforms.
That said, some things I use (like SQLite, gRPC) will probably forever remain a C dependency, so I'm not sure if WASM would help with that.
The Microsoft's React Native for Windows/macOS team keeps comparing how Electron sucks to React Native, so I am hoping that they eventually manage to pull Viscose into their direction.
If you do it the way I do and use Electron as a skin / thin client to a compiled binary within the package, you remove that bottleneck. That way, you get both cross-OS capabilities, a familiar UI toolkit (JavaScript, I use Vue) and native binary speed and real multi-thread capabilities.