5 ms·
https://github.com/neutralinojs/evaluation https://github.com/neutralinojs/evaluation 8MB vs 42MB for electron. That's pretty real savings IMO! It's also usin
by rektide 4y ago
https://github.com/neutralinojs/evaluation https://github.com/neutralinojs/evaluation
8MB vs 42MB for electron. That's pretty real savings IMO!
It's also using the existing shared libraries on your system, so there's a very real chance a lot of this 8MB might be ready resident & take zero additional space. It'd be great to see what the memory impact of launching a second & different app would be!
Personally I think the Electron hate is because people think every Electron app behaves as badly as Slack. Honestly 42MB is not that bad. But it hurts my soul that each app has it's own static copy of the browser, means there is zero chance for sharing. If you are running 2-3 apps it's fine but I want a world where we can potentially have dozens or even a hundred little gui apps running & it works fine, no problem. That would be on par with native apps & this is a clear demonstration of one way we could get there.
The missing next step is that this system launches a mini http/websocket server to run. It'd be interesting to explore using a lightweight Sandboxing multi vm to host apps on, might make the server side lighter weight too. Wasm, or cloudflare's workerd... The CRI folk have been busy building support for managing work let like things like this, & desktop could definitely pull some wins, now that folks like Neutralinojs and Tauri are starting to do better at desktop webapps.
- circuit10 4y agoHmm, that is a big difference, but if your program uses, say, 200MB, then I imagine it would be more like 208MB vs 242MB? But having lower overhead is still important for smaller things. Also I wonder how the memory usage is lower, is it because things are shared somehow?
- rektide 4y agoWebkit is just a web page viewer whereas chrome includes a million auxiliary capabilities. Tab management, dev tools, history, account synching, the browser chrome, the complex url bar, it goes on and on and on. Most electron apps don't use most of this code but it's at least mmapped in. As for size, most web pages I visit are under 40MB. Suddenly 8MB Vs 42MB is a huge difference in overhead. There's definitely been a trend of page loading tons of data & holding onto it. There's so many better architectures. Using http caching & just re-requesting pages of data on demand would be a huge architectural win for most pages. We can get fancier & use indexeddb or now sqlite, to let us free memory. The actual footprint of most pages/apps ought to be tiny. That raises an interesting question of Neutralinojs, of how much of the incredibly good web shit we've built is available. A huge part of the Chrome size is that it supports hundreds of web platform APIs. Webkit doesn't AFAIK, it's up to the implementer to rebuild most of the Javascript APIs. It's gonna suck not having the ability to load your wasm sqlite on origin private file systems with a service worker cache layer web architecture to neutralinojs. I guess that's the massive mack-truck sized weakness I hadn't spotted with this whole plan. It makes me rather want something that can use whatever Chrome I have on the system, so disk & memory costs are low.
- circuit10 4y agoBut on Windows it will be using Edge which is a Chromium fork with even more extra things to bloat the binary size, yet it still uses less memory on Windows according to the benchmark