TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Why the Facebook iOS Application is so large

51 pointsby jafitcalmost 10 years ago

14 comments

dshankaralmost 10 years ago
If you&#x27;re having difficulty loading this webpage, it&#x27;s because the author decrypted Facebook&#x27;s iOS binary and listed all 18,000 header files.<p>Yes, this webpage is merely a list of 18,000 headers.
评论 #10066591 未加载
评论 #10066982 未加载
64mbalmost 10 years ago
TL;DR Facebook app has 18k classes, if you want to know what they are look here: <a href="https:&#x2F;&#x2F;gist.github.com&#x2F;quellish&#x2F;473f513fbd1310233a8e" rel="nofollow">https:&#x2F;&#x2F;gist.github.com&#x2F;quellish&#x2F;473f513fbd1310233a8e</a><p>FB App is 114MB in size, but loading this page in Chrome will use a good 450MB, idk how they managed that.
评论 #10066530 未加载
评论 #10066536 未加载
aaronbrethorstalmost 10 years ago
I was expecting a bit more nuance and insight than &#x27;18,000 classes, lol, FB is dumb.&#x27; At the very least, it&#x27;d be interesting to note what the size of the app might be after app thinning goes live next month.
评论 #10066549 未加载
sovandealmost 10 years ago
This so called &quot;investigation&quot; of the Facebook app can be done much simpler. Locate the app in iTunes, rename the .ipa file to .zip, unzip and run otool and nm on the binary. The author list 18,000 header files which is not much of an investigation nor much interesting. Though the staggering number of classes does admittingly somewhat explain the enormous size of the FB app. I do not use the FB app, but generally it can be equally illuminating to look in the Resources&#x2F; folder of an app if you wonder where the size came from.
评论 #10067212 未加载
评论 #10066582 未加载
评论 #10066876 未加载
revelationalmost 10 years ago
Their binary alone is 118MiB? Even with all the auto-generated crap in there (I hope no human chose those names), how do they manage that?<p>I wonder how long it takes for an iPhone to even load that thing into memory before it starts executing any code..
评论 #10067228 未加载
wruzaalmost 10 years ago
Seems to me that huge part of this was auto-generated (and auto-structured), and each .m&#x2F;.h contains very few lines of code. I don&#x27;t know what FB app does, but with 18000+ fully functional non-excessive handwritten modules you can just win the internets. Oh wait~
natchalmost 10 years ago
They are obviously very lost and reinventing wheels, rather than learning and applying the right design patterns for Apple platforms. I talked to a Facebook iOS person on here recently who was under the impression that GCD offered no help with concurrency problems.
delinkaalmost 10 years ago
Chrome asks to kill the page after a bit. Does this content exist in a cleaner state?
评论 #10066558 未加载
评论 #10066545 未加载
klapinat0ralmost 10 years ago
I <i>hope</i> it&#x27;s a mechanism to make it possible for new employees to actually work on this app.<p>Perhabs someone with experience on large complex applications can share some insights?<p>Otherwise, I pity the FB employees who gets assigned to this project. &quot;<i>Here you go, fix that button, here&#x27;s 18k files to digest</i>&quot;.<p>Surely they must&#x27;ve decoupled it into oblivion in order to have a class that manages &quot;just that&quot;, so<p>1. new employee can work in an &quot;isolated&quot; context (although he really isn&#x27;t)<p>2. can locate where to write and debug in this complex codebase.
Namrog84almost 10 years ago
But then they can say. In 2.0 we improved performance 50%!! And repeat this process of headline news several times!
kenOfYugenalmost 10 years ago
unneeded complexity
评论 #10066502 未加载
评论 #10066532 未加载
评论 #10066663 未加载
评论 #10066491 未加载
评论 #10066469 未加载
jafitcalmost 10 years ago
I&#x27;ve never seen an iOS application quite like this. I wonder how they even manage it. Tons of subprojects perhaps?
评论 #10066585 未加载
vbezhenaralmost 10 years ago
That&#x27;s what I call a fat client :)
mahousealmost 10 years ago
Makes me remember of that time they had to cheat on Dalvik because they hit the 65k methods limit 8-) <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=8162342" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=8162342</a> (blog link is dead)<p>Anyway, I find this to be pointless, when the majority of that size is probably taken by assets.