News for hackers. Stuff that matters.
Re:Electron 7.0 by 0xffff2 on Thursday October 24, 2019 @03:46PM (#21348472)
>The speed problems and bloat issues of Electron is just shoddy programming on the maker’s part - Electron itself isn’t slow.

I doubt this is entirely true. VSCode is frequently cited as an example of a good, performant Electron application. Its performance is generally acceptable (I use it as my primary text editor), but it absolutely chugs sometimes. Sublime is light-years ahead in terms of performance.

Re:Electron 7.0 by hajile on Thursday October 24, 2019 @08:13PM (#21350485)
MS has already proven that canvas is faster and better than HTML for text when they converted the terminal to canvas and it got an order of magnitude faster.

I wonder why they haven't expanded on this with Rust and WASM taking events and returning a canvas buffer. This seems like the best of both worlds. They get the responsiveness and performance of native code for the hard bits while retaining the ease and flexibility of HTML for the rest of the UI.

Re:Electron 7.0 by rolleiflex on Thursday October 24, 2019 @03:52PM (#21348522)
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.

Re:Electron 7.0 by wwright on Thursday October 24, 2019 @07:46PM (#21350331)
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).

Re:Electron 7.0 by tybit on Thursday October 24, 2019 @05:36PM (#21349454)
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.
Re:Electron 7.0 by nobleach on Thursday October 24, 2019 @07:14PM (#21350141)
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).

Re:Electron 7.0 by tuananh on Thursday October 24, 2019 @11:26PM (#21351597)
true that. native module is still quite a lot faster in my experiencee
Re:Electron 7.0 by rolleiflex on Thursday October 24, 2019 @05:40PM (#21349483)
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.

Re:Electron 7.0 by pjmlp on Friday October 25, 2019 @01:17AM (#21352118)
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.