4 ms·
That’s pretty much the floor for an Electron app. If you’re a small shop or solo dev, it is real hard to justify going native on three platforms when electron
by yojo 1y ago
That’s pretty much the floor for an Electron app.
If you’re a small shop or solo dev, it is real hard to justify going native on three platforms when electron gives it for (near) free. And outside of HN, no one seems to blink at a 250MB bundle.
There are alternatives like Tauri that use the system browser and allow substantially smaller bundles, but they’re not nearly as mature as Electron, and you will get cross platform UI bugs (some of which vary by user’s OS version!) from the lack of standardization.
- goodpoint 1y ago> And outside of HN, no one seems to blink at a 250MB bundle. Except like 1 or maybe 2 billion people with slow or expensive internet.
- deleted 1y ago[deleted]
- rafram 1y agoThis app is Mac-only, which makes the choice to use Electron a little confusing.
- yojo 1y agoThat is… surprising. I’d actually seen this project before because the author did a nice write up on using React portal to portal into electron windows[1], which is something I decided to do in my app. I’d just assumed his was a cross platform project. 1: https://pietrasiak.com/creating-multi-window-electron-apps-using-react-portals https://pietrasiak.com/creating-multi-window-electron-apps-u...
- zahlman 1y ago> And outside of HN, no one seems to blink at a 250MB bundle. I can remember when I would have to leave a 250MB download running overnight. Before that, I can remember when it would have filled my primary hard drive more than six times over. ... Why can't the app-specific code just get plugged into a common, reusable Electron client?
- jasonjmcghee 1y agoYou mean like WebKit which Tauri uses?
- yojo 1y agoI go into more detail in a sibling comment, but Tauri does not provide a standardized web runtime. The webview you get depends on your OS and OS version. They’re all “WebKit”, but definitely do not all render the same. I have built a Tauri app and switched to Electron after encountering multiple x-plat rendering bugs.
- yojo 1y agoDifferent versions of electron bundle different versions of chromium. There can/will be rendering differences between them. Tauri is an alternative framework that uses whatever web view the OS provides, saving ~200mb bundle size. On Mac that’s a (likely outdated) version of Safari. On Windows it’ll be Edge. Not sure what Linux uses, I’d guess it varies by distro. The promise of Electron (and it’s an amazing value prop) is that your HTML/JS UI will always look and work the same as in your dev environment, no matter what OS the host is running. I don’t have the time or inclination to test my app on the most recent 3 releases of the most popular operating systems every time I change something in the view layer. With Electron, I trade bundle size for not having to do so. I do think alternatives like Tauri are compelling for simple apps with limited UI, or where a few UI glitches are acceptable (e.g. an internal app). Or for teams that can support the QA burden.
- pcthrowaway 1y ago> And outside of HN, no one seems to blink at a 250MB bundle. Please, many people connect to the internet via a mobile phone hotspot, at least occasionally. This bug would likely cause you to go through your entire monthly data in a few hours or less.
- yojo 1y agoI’m not excusing this bug. There are several poor decisions that went into this issue, but my contention is that using electron (with the resulting 250mb bundle) is not one of them. You should probably not roll your own auto-updater. If you do, checking every 5 minutes for updates is waaaay too often (and likely hurts battery life by triggering the radio). And triggering a download without a user-prompt also feels hostile to me. The app size compounds the problem here, but the core issue is bad choices around auto-updating