Ever wondered why Facebook’s iOS app is so slow? We’ve explained it all before, but what it comes down to is that the app is an Objective C wrapper around a UIWebView component loading Facebook’s raw HTML data.
Why’s that so slow? Well, UIWebview isn’t very fast, and it has terrible caching, which requires the Facebook app to redownload your entire wall every time it needs to do an update, instead of the chunks it needs.
According to The New York Times, though, that could soon change, and Facebook could ditch the UIWebview bottleneck once and for all.
Nick Bilton reports:
One of the Facebook engineers said the new application has been built primarily using Objective-C, the programming language used to build applications for iOS. Many of the components of the current version of the Facebook app are built using HTML5, a Web-based programming language.
The current version of the app is essentially an Objective-C shell with a Web browser inside. When it comes to speed, this is like putting the engine of a Smart Car in the body of a Ferrari.
Applications that are predominantly HTML5 render most of the components of an app as a Web page, pulling images and content from the Web directly into the application. Objective-C takes the opposite approach, taking full advantage of the hardware in the iPhone and then building most of the functionality directly into the application so it has to collect less information from the Web.
I had the opportunity to see the yet-unreleased iPhone application and its fast. Blazing fast. The two developers I spoke with said the new application is currently being tested by Facebook developers and is expected to be updated this summer.
In other words, instead of having an Objective C app squirting out results in HTML5, Facebook’s new app would see Facebook data sent directly to the iPhone in an Objective C compliant format, without having to use the iPhone’s UIWebview in-app browser to display HTML.
That sounds like a sound approach. I can’t wait.