Define scroll view frames using tools

Is there a way to identify the exact place in the code (for example, a long-term function or wait for a lock) that causes the frame to drop using tools and / or Xcode?

I try to make the scroll of my scroll view as smooth as possible, and the FPS sometimes drops to 59 or even 58, and about 60 years is about half, so I would like to know what exactly is causing this.

I turned on the Record Waiting Threads flag in the CPU Usage tool of the Core Animation template, and it occasionally shows needle bursts with 100% use of each core (close to seconds with dropped frames), but I can’t figure out how to determine the exact location in to the code causing the crash - all the called functions are rather weakly influenced in one-bit percent (so it can be very good the thread expects blocking).

+5
source share
1 answer

Have you tried using the Time Profiler tools in the Tools to see which parts of your code are more active while scrolling?

There's a very good WWDC instructional video on how to use time profiling to find and fix bottlenecks in your code: https://developer.apple.com/videos/play/wwdc2015/412/

I suggest you watch this video, it can help you find a solution to your problem.

+2
source

Source: https://habr.com/ru/post/1244421/


All Articles