If you're having difficulty loading this webpage, it's because the author decrypted Facebook's iOS binary and listed all 18,000 header files.<p>Yes, this webpage is merely a list of 18,000 headers.
TL;DR Facebook app has 18k classes, if you want to know what they are look here: <a href="https://gist.github.com/quellish/473f513fbd1310233a8e" rel="nofollow">https://gist.github.com/quellish/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.
I was expecting a bit more nuance and insight than '18,000 classes, lol, FB is dumb.' At the very least, it'd be interesting to note what the size of the app might be after app thinning goes live next month.
This so called "investigation" 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/ folder of an app if you wonder where the size came from.
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..
Seems to me that huge part of this was auto-generated (and auto-structured), and each .m/.h contains very few lines of code. I don't know what FB app does, but with 18000+ fully functional non-excessive handwritten modules you can just win the internets. Oh wait~
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.
I <i>hope</i> it'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. "<i>Here you go, fix that button, here's 18k files to digest</i>".<p>Surely they must've decoupled it into oblivion in order to have a class that manages "just that", so<p>1. new employee can work in an "isolated" context (although he really isn't)<p>2. can locate where to write and debug in this complex codebase.
Makes me remember of that time they had to cheat on Dalvik because they hit the 65k methods limit 8-) <a href="https://news.ycombinator.com/item?id=8162342" rel="nofollow">https://news.ycombinator.com/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.