Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Microsoft has already updated Window's native web-view to Edge, from IE. There are already some projects that take advantage of this and enable multi-platform app creation, with executables much lighter than Electron. A good example is https://github.com/zserge/webview. I have tried its Rust binding, and it works very nicely.


The Chromium-based Edge has its own separate webview API (called WebView2) which is still only in preview right now: https://docs.microsoft.com/en-us/microsoft-edge/hosting/webv...


How is a shared runtime much lighter than electron? While you can share some memory, I doubt it's most of it.

If I check the dozens of Chrome processes on my machine, the largest part of their working sets is private, which is evidence against significant memory sharing.


One aspect of "lightness" is transfer & disk: initial download duration, storage size per app (often over 100 MB for apps with embedded Chromium), and the size of each app update which often needs to update the embedded Chromium too, if they're being responsible. There is no "LTS" version of Chromium.


I don't know much about Chrome's architecture, but are you sure each tab/window/origin has a separate set of all processes?

It seems reasonable to only run the security sensitive parts in a dedicated process per origin and run other tasks in a central process for all web pages.

From what I understand, Chrome's processes communicate a lot via message-passing. You probably don't need large amounts of shared memory for that.


The weight of a bunch of DLLs, type information etc for chromium is actually pretty sizable. An electron app spins up 6 processes on average last time I checked, more sometimes. The v8 team has had to invest a lot into reducing bloat from per-process duplication of data and also found ways to minimize startup time.

The largest part being private doesn't mean saving 10-20mb per process is insignificant. With a few electron apps open I'm easily losing a few hundred megs to electron overhead and many machines don't have that much RAM, especially laptops.

Each electron app also needs its own copy of centralized services like the i/o process, where a single chrome instance can share that across all tabs. An OS-level PWA implementation could share it across all PWAs and electron apps too.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: