Episode 36, recorded Sunday May 6th, 2012
In this episode my special guest is Will Kiefer. He is the Senior iOS Engineer in charge of Google Currents. Will tells us why UIWebView isn’t all that bad and has some amazing performance tips for us with which to tame it. You should make lots of notes and you will feel like you visited a lab at WWDC and had your brain supercharged.
Google Currents iOS app on the app store, recently available internationally.
- Cache UIWebViews, saves time on setup
- When profiling also look at CoreAnimation tool and VM tracker
- Avoid changing the frame of web views, that causes it to do overtime
- When communicating from web view to Objective-C it is faster to change the hash on a small hidden iframe
- The frame of a web view should be smaller than the size of the screen, or if that is not possible have a clipping view
- NSURLProtocol is a better choice for caching than NSURLCache because it is concurrent
- With CoreData Will has one MOC for UI stuff and a second for updating in background, changes are then merged in by UI MOC
Google Currents Producer Tool, requires Chrome at present.