1: Apply startup time when the app starts, load only the resources that are related to startup and must be loaded at startup.
2: Local image loading method local image loading common methods are two: (1), [UIImage imagenamed:@ ""] pictures used multiple times, you need to use this method to add the cache (2), [[UIImage alloc] initwithcontentsoffile:@ ""] pictures are not used frequently, do not use the cache
3: Do not block the main thread development in addition to UI processing, other tasks as far as possible in the background line preempted.
4:uiview (1), if your view is transparent, you need to set opaque to Yes. (2), use UITableView and Uicollectionview reuse, and cache the height of the dynamic cell. (3), delay loading not urgent need of views. (4), try to avoid clipping the picture if necessary in the background thread processing.
5: Cache cache requires repeated display of data, such as network requests, pictures.
6: Avoid excessive consumption of resources when creating objects assuming that the application is used more than once to date processing, the date objects are kept globally unique.
7: Releasing the object (1), when too many objects are created in the arc, the memory continues to rise, and when needed, an automatic free pool is added to free the unwanted resources. (2), release their own open memory space in time.
8: Prevent circular references (1), try to avoid importing the header file in the header file, use the @class declaration class, and #import in the. m file. (2), use the corresponding keyword to reference the object in the set proxy/block.
9: Data storage data storage roughly sub-plist, object archiving, SQLite. Nsuserdefault is suitable for storing small amounts of data, private information using keychain, SQLite suitable for a large number of data, archiving performance is low, try to avoid the use.
10: Memory warning handles three ways to release unnecessary data when the system issues a memory warning. Implement applicationdidreceivememorywarning Uiviewcontroller rewrite didreceivememorywarning in appdelegate Registration NOTICE: uiapplicationdidreceivememorywarningnotification
11: Performance Detection Static Analysis app: Menu-product-analyze can locate unused variables, memory leak analysis app takes time per operation: Instruments-time Profiler. Dynamic analysis of memory leaks: Instruments-leaks.
IOS App Performance Optimization