5 ms·
There was a time on desktop when apps were super light. Chat apps took a few MBs of memory at most and used native controls. Desktop apps are now bulky thanks
by me551ah 7y ago
There was a time on desktop when apps were super light. Chat apps took a few MBs of memory at most and used native controls.
Desktop apps are now bulky thanks to electron and take up collosal amount of memory and consume a ton of battery. I'm just afraid that with the rise of adoption of PWAs mobile apps are soon going to end up the same.
- saagarjha 7y agoPWAs are generally significantly lighter, size wise, than Electron.
- thefounder 7y agoThey are also significantly less powerful(i.e you can't even make a http request if the target doesn't whitelist you)
- deleted 7y ago[deleted]
- me551ah 7y agoBut the overhead of a dynamic language like javascript is always going to be much higher than Swift/Java.
- saagarjha 7y agoTechnically, this isn't always true. But in general the overhead of using JavaScript isn't the actual blocker for making good UI experiences for a platform.
- me551ah 7y agoJavascript is only one of the aspects. With native apps you also get Hardware-accelerated GPU rendering on UI controls. Thus making the UI appear a lot smoother. While mobile browsers accelerate some parts of a webpage using GPUs, most parts of a webpage are not. This is due to the huge amount of complexity in layouts on a typical webpage. Same is true even for most desktop browsers, with the exception of Firefox when you use WebRender on a supported nVidia GPU ( but even that is in beta). This is the reason why Google built flutter like a game engine, so that it could use the additional GPU horsepower on mobile apps to make UI appear more smoother and natural.
- fauigerzigerk 7y agoI thought both Flutter and Chrome use Skia for rendering. Does that not result in comparable GPU acceleration?
- WA 7y agoMy Cordova-based app has a download size of 5MB. It is the most lightweight app I have installed. Most native apps come with at least 50 MB, often a lot more for god knows what reasons. The battery and memory consumption depends a lot on what the app actually does.
- giancarlostoro 7y agoInteresting, I thought Cordova was a browser wrapper, is there more that Cordova does? You're making me want to revisit Cordova.
- WA 7y agoNo, it’s just a wrapper around WKWebView and has the capability to expose native APIs in JS. But it’s still very lightweight, because unlike Electron, it doesn’t bundle an entire browser.
- giancarlostoro 7y agoI agree, there's too many Electron apps that dont even use most of the things you gain from it. Might as well have a more lightweight browser.
- untog 7y ago...no? PWAs all share the same system webview. Three PWAs are essentially no different to having three tabs open in Safari/Chrome. The load they place on the phone is significantly less than most native apps. I've noticed when having this debate that people seem to compare the worst possible web experience with the best possible native one. Yes, there are bloated and slow web sites, but don't try to tell me there aren't also native apps bloated to the point of absurdity, with multi-second load times even on a top of class device. And there are plenty of fast, small web sites too! We can agree on UI, though. The web could do with a lot more native-level UI primitives (UITableView, please lord). As an added bonus this would help remove a lot of the bloat and performance issues as people try to replicate native behaviours in JS.
- lima 7y agoPWAs use the (very efficient) system webview implementation rather than bundling a full browser runtime like Electron apps do.