Article From:

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

instrumentsOpen mode:

  • Click Xcode – & gt; Open Developer Tool – & gt; instruments;


  • Tools can be started by Product – & gt; Profile in the Xcode toolbar



Common problem:

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:

Leave a Reply

Your email address will not be published. Required fields are marked *