4 ms·
I think this might be closer to the truth than you might think. Due to the absence of (cross-app) shared libraries on at least iOS, developers often end up bui
by lxgr 10mo ago
I think this might be closer to the truth than you might think.
Due to the absence of (cross-app) shared libraries on at least iOS, developers often end up building big company-internal libraries that then have to be shipped with all of their apps.
Tree shaking isn’t perfect, and the result are these > 0.5 GB monstrosities.
- seizethecheese 10mo agoIs it plausible that the libraries are so big? I mean, for example, NodeJS is in the order of 100mb and contains the whole v8 engine. The Gmail app size has to be assets, right?
- reactordev 10mo agoStatic linking will do that. Imagine you have 400mb of binary objects your app depends on. Libraries your company uses for app analytics, SSO, 2FA, Corporate service bus api, etc. You statically link all those for your 50mb Swift UI app and bam, you’re in the 700mb range.
- chasil 10mo agoThe use of Go will definitely do that, as it prefers to statically link everything. https://go.dev/wiki/Mobile https://go.dev/wiki/Mobile If we had an entire POSIX OS built with Go, then we would be back to statically-linked UNIX prior to BSD. https://www.freecodecamp.org/news/golang-statically-and-dynamically-linked-go-binaries/ https://www.freecodecamp.org/news/golang-statically-and-dyna...
- reactordev 10mo agocan you build a Swift UI in go?
- chasil 10mo agoThere is a single mention of Swift on the developer page that I posted. "Note that you can also invoke GoHelloGreetings from Swift by importing Hello." @import Hello // ... let msg = Hello.GoHelloGreetings("gopher")
- reactordev 10mo agoOh lord…
- tormeh 10mo agoThat's a lot of code, though. I can't imagine common libraries so big. The Linux kernel is less than 100mb.
- lxgr 10mo agoThe neat thing about code is that there's no upper limit on how inefficient one can get.
- HPsquared 10mo agoIt's literally "work expands to fill the available time" (s/time/cycles and memory/)
- yobbo 10mo agoThat would be the source code. The default debian kernel is around 12 MB but it could be much smaller. It doesn't bundle full random external libraries compiled with debugging symbols and "whatever other stuff".
- tgsovlerkhgsel 10mo agoYou'd be surprised what ends up dragged into where when you have a build system that makes it easy. Just look at the npm.js mess (and what kind of things ended up depending on what kind of other thing) if you want an example.
- Aperocky 10mo agoIt's one thing to have common internal libraries and another thing to have the compile process blanket include everything that's in it.
- stonemetal12 10mo agoOn Android, Gmail reports as being under 200 MB. So I agree, they probably include way to much for portability.
- lxgr 10mo agoOn Android, sharing code is much more feasible than on iOS as far as I understand it, especially if you're Google and can demand that everybody using your apps has Play Services installed.
- lenerdenator 10mo agoFor what it's worth, Outlook for iOS on my iPhone has an executable that weighs in at 368.8 MB. Google needs to trim some stuff down.
- themafia 10mo ago> Tree shaking Modern development is insane to me. "Let's do it badly, and hope a tool can fix it for us." "Is anyone keeping an eye on the tools? No? Perfect!" Particularly for developers inside the company that owns the platform. At some point they have to recognize they've completely screwed all this up.
- vrighter 10mo agoTree shaking is insane to me too. Just use a language that can actually do proper DCE, if you're not building a website. (I do realize though that most "apps" are just websites without the browser toolbar, unfortunately)