Xcode Analysis Performance

Source: Internet
Author: User

1.xcode Connect your phone, choose Product > Manage schemes in the menu, double-click your app's scheme, then go to edit;
Click Run this scheme, and then set the GPU Frame Capture on the Options tab, which is automatically Enabled by default, but because Gles and metal are present, it is recommended to force the setting to OpenGL Es or metal (for example, UE4-based apps).
2 Capturing a Frame
Then you can capture the frame of the app you want to debug, run the app in debug mode (Product > Run or⌘r), and when your app is fully loaded on the real machine, you can go to debug Navigator (View > Navigators > Show Debug Navigator, or simply click on the small icon on the left-hand code bar, then click on the FPs tab on the Debug Navigator. For example, you can see the updated FPS display for your app, as well as the different test items on the left, and the programmer's goal is to get it up to 60FPS, and our Sun temple is only about 26FPS at this time, and we need to find the bottleneck of performance.
In the editor, we can see the CPU and GPU consumption time in milliseconds, if you want to reach a maximum of FPS, then the CPU and GPU time should be only 16 milliseconds, 30FPS is 32 milliseconds, and in this case, the CPU consumption of 38 somewhat exceeded the limit.
As can be seen here, our main bottleneck is not on the GPU, but on our code calls, in order to get better information, we can capture a gputrace to see the specific process within each frame rendering, we click the camera icon on the Debug Output window to get the entire frame.
Note:xcode can't even play other games.
Reference:

http://m.blog.csdn.net/article/details?id=50715216
https://developer.apple.com/library/content/documentation/3DDrawing/Conceptual/OpenGLES_ProgrammingGuide/ Toolsoverview/toolsoverview.html

Https://www.cnblogs.com/TracePlus/p/4093830.html

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.