- Unity 2017 Game Optimization(Second Edition)
- Chris Dickinson
- 328字
- 2021-07-02 23:21:05
Understanding the Profiler
The Profiler is an arguably well-designed and intuitive tool, so understanding the majority of its feature set can be gained by simply spending an hour or two exploring its options with a test project and reading its documentation. The more we know about a tool in terms of its benefits, pitfalls, features, and limitations, the more sense we can make of the information it is giving us, so it is worth spending the time to use it in a playground setting. We don't want to be two weeks away from release, with a hundred performance defects to fix, with no idea how to do performance analysis efficiently.
For example, always remain aware of the relative nature of the Timeline View's graphical display. The Timeline View does not provide values on its vertical axis and automatically readjusts this axis based on the content of the last 300 frames; it can make small spikes appear to be a bigger problem than they really are because of the relative change. So, just because a spike or resting state in the timeline seems large and threatening does not necessarily mean there is a performance issue.
Several Areas in the Timeline View provide helpful benchmark bars, which appear as horizontal lines with a timing and FPS value associated with them. These should be used to determine the magnitude of the problem. Don't let the Profiler trick us into thinking that big spikes are always bad. As always, it's only important if the user will notice it.
As an example, if a large CPU usage spike does not exceed the 60 FPS or 30 FPS benchmark bars (depending on the application's target frame rate), then it would be wise to ignore it and search elsewhere for CPU performance issues, as no matter how much we improve the offending piece of code, it will probably never be noticed by the end user, and therefore isn't a critical issue that affects user experience.
- 自己動手實現Lua:虛擬機、編譯器和標準庫
- Building a Home Security System with Raspberry Pi
- Arduino by Example
- HTML5+CSS3基礎開發教程(第2版)
- UI智能化與前端智能化:工程技術、實現方法與編程思想
- MATLAB實用教程
- Building a Recommendation Engine with Scala
- Spring Boot Cookbook
- 全棧自動化測試實戰:基于TestNG、HttpClient、Selenium和Appium
- Learning Concurrent Programming in Scala
- C語言從入門到精通
- MINECRAFT編程:使用Python語言玩轉我的世界
- Building Dynamics CRM 2015 Dashboards with Power BI
- Java編程從入門到精通
- Python預測分析實戰