Contents of performance testing：Resource consumption, memory leak, traffic consumption, power consumption, power consumption, rendering effect, loading time, etc.
Ways of performance tuning：
- Through specialized Performance Tuning Tools Instruments
- By optimizing the code
- Click Xcode – & gt; Open Developer Tool – & gt; instruments;
- Tools can be started by Product – & gt; Profile in the Xcode toolbar
1、AFNetworking3.xMemory leak point:
Each time an instance of AFHTTPSession Manager is initialized on a request, memory is reallocated and initialized, and the instance created before is not released, resulting in a memory leak.
Solution: Create a single instance inheriting AFHTTPSession Manager, through which the request method can be invoked to avoid creating instances many times.
Refer to Link: https://www.cnblogs.com/yajunli/p/6501799.html