Stupid question: instead of embedding an entire browser in each-and-every app and trying to keep that secure, why not package the native desktop framework as a shared, versioned component and the app as a tiny thing that depends on it?
That's sane. Sanity is prohibited in the realm of UI programming. There's apparently a law somewhere that states that all GUI libraries and APIs must be one of: platform-specific, bloated/slow, or incomplete/ugly.
NeutralinoJS: Lightweight Electron alternative using native browser controls
41–50 of 200 posts
Re: NeutralinoJS: Lightweight Electron alternative using native browser controls
#42using the word "lightweight" to describe anything involving js and an html renderer should be prohibited
Indeed. Webshits alone are responsible for 1 or 2% of global energy usage.
Re: NeutralinoJS: Lightweight Electron alternative using native browser controls
#43Stupid question: instead of embedding an entire browser in each-and-every app and trying to keep that secure, why not package the native desktop framework as a shared, versioned component and the app as a tiny thing that depends on it?
I'm generally pretty old school when it comes to development practices but I can totally understand how appealing it is to effectively ship your entire environment as part of your application instead of relying on shared dependencies. Dealing with dependency incompatibility is a huge maintenance burden in my experience, and it's super tricky to debug if you don't have access to the problematic environment (which is m…
This is actually already how the Microsoft Visual Studio C Runtime (aka MSVCRT) is distributed: each application embeds or streaming-downloads the exact [ABI] version of the runtime it needs, but only one of each exact [ABI] version of the runtime needs to exist per system, and each of those runtimes can be upgraded by the OS to resolve security problems (while never altering the ABI guarantees that version distribution makes.)
As such, a runtime built this way is a lot like a base layer in a Docker image: it’s a static dependency of the app, installed during the app’s installation, and held in a pseudo content-addressable store that deduplicates it from other apps’ demands for the same dependency.
Re: NeutralinoJS: Lightweight Electron alternative using native browser controls
#44Looks kind of like WebView [1] which I earnestly tried but eventually abandoned. Using the system-provided web engine is great for space savings, but terrible for cross-compatibility and feature availability owing to having to use IE on Windows. [1] https://github.com/zserge/webview
Isn't the "system provided web engine" now Edge on Windows 10, and has been fore a while?
Re: NeutralinoJS: Lightweight Electron alternative using native browser controls
#45using the word "lightweight" to describe anything involving js and an html renderer should be prohibited
Indeed. Webshits alone are responsible for 1 or 2% of global energy usage.
Source?
Even disregarding the poor term you've used, I'm pretty skeptical of what you just stated. Especially with a margin error of 1%.
Re: NeutralinoJS: Lightweight Electron alternative using native browser controls
#46Earlier quoted context omitted.
Indeed. Webshits alone are responsible for 1 or 2% of global energy usage.
I feel like this calibre of comment is a perfect example of the "reddification" of HackerNews recently
Re: NeutralinoJS: Lightweight Electron alternative using native browser controls
#47Re: NeutralinoJS: Lightweight Electron alternative using native browser controls
#48Chromium is built to share a lot of things between tabs efficiently, but this economy-of-scale doesn’t translate over into having multiple instances of Chromium running. Each instance gets its own GPU renderer process + font-glyph tile cache, its own network-request cache (i.e. its own in-memory key-value store with its own LRU limit), etc. Running multiple Chromium instances at once is a bit like running multiple copies of an RDBMS on the same machine and expecting them to not fight over memory.
Does anyone know what exactly this “base” overhead in Chromium consists of; and, more importantly, how often it changes relative to Chromium releases? Because I’m wondering whether it’d be possible to factor most of it out into a separate layer from the highly-iterated-on “browser engine” DLL stuff (the renderer + DOM + JS layer) into its own sort of “Chromium Core Services” DLL, which could be relatively-more ABI-stable.
If you had that factoring-out, you could achieve a pretty good memory + CPU savings just by having Chromium + application frameworks like Electron all share one copy of the Chromium Core Services between them, while keeping their own higher-level “renderer+VM” DLL on top (which would hopefully be pretty stateless in terms of shared state, only adding the ~50MB mmap(2) overhead of the DLL-image itself, and then whatever memory the individual render-contexts consume.)
Alternately, of course, you could build Electron as a pseudo-browser where Electron “apps” are just separate windows running in its memory space, and the native Node processes are all just distinct V8 Execution Contexts in the same process. But 1. this would lose you the ability to develop for a particular version of the renderer, which is what Electron gains you over projects like Neutralino in the first place; and 2. this wouldn’t give you the benefit of Electron sharing service-memory with Chrome itself.
Re: NeutralinoJS: Lightweight Electron alternative using native browser controls
#49Re: NeutralinoJS: Lightweight Electron alternative using native browser controls
#50Why no macOS in the comparison? https://github.com/neutralinojs/evaluation For a moment I thought Neutralino didn't support macOS.