3 ms·
Most apps, 2x binary size is no big deal. This has been true since the 1990s, when we had fat binaries that were M68K and PowerPC. Nobody’s doing 17x, that’s ju
by klodolph 6y ago
Most apps, 2x binary size is no big deal. This has been true since the 1990s, when we had fat binaries that were M68K and PowerPC. Nobody’s doing 17x, that’s just a joke.
Figuring out how to get users to download the correct binary, now that sucks. Do you add JavaScript to your download page or do server-side sniffing with the user agent to deliver the correct binary? And do you want to explain to someone that yes, they downloaded the Mac version but they have an x86 Mac and can’t download the ARM binary?
- gruez 6y ago>And do you want to explain to someone that yes, they downloaded the Mac version but they have an x86 Mac and can’t download the ARM binary? Can't you detect the system architecture through the user agent string? eg. https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/User-Agent/Firefox#Macintosh https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Us.... I guess it's still an issue if you're downloading for ARM mac, using a x86 mac, but that's a pretty rare occurrence and you can work around it by allowing users to select the architecture manually.
- klodolph 6y agoThe only advantage that user agent sniffing has over fat binaries is the decreased size, and usually, it’s a fairly small difference. Small benefit, big drawback. Plus, there are all the smaller developers or hobbyists who just want to share the app they made, and maybe don’t want to figure out how to get user agent sniffing working on their site—or maybe they are just sharing a link to Google Drive with the game that they made. Also from my experience, people still share downloaded copies of applications. We can use thin binaries only when necessary—web browsers, for example.
- Wowfunhappy 6y agoI would go further than "no big deal"—it's a complete nonissue. You could have 5 architectures and it would still be a nonissue, because for most graphical applications, 99% of the size is taken up by graphics and similar assets. The copy of TextEdit on my Mac is 6.8 MB, but the actual binary is only 167 KB. Even if you were to go nuts and compile a full-on 17-architecture version of the TextEdit binary, it would still constitute less than half the size of the app, and this is for TextEdit, an app with exceedingly few graphics. And, we're talking exclusively about hard disk space—it's not as though the foreign architectures are getting loaded into memory and taking up space there. I'm all about sweating the details when it comes to optimization and performance, but even on a smaller SSD, a couple extra megabytes per app just isn't going to have a real impact. Fun fact: many of the binaries in Snow Leopard are still PPC-Intel universal binaries, even through 10.6.8. The extra space used was so minimal that Apple didn't bother to fully strip out the PPC portions until Lion. (Early versions of Snow Leopard can even be booted on PPC by replacing certain files: https://forums.macrumors.com/threads/snow-leopard-on-unsupported-ppc-machines.2232031/ https://forums.macrumors.com/threads/snow-leopard-on-unsuppo...)