官术网_书友最值得收藏!

Understanding the Profiler

The Profiler is a 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 Timeline View graphical display. 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 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, since 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.

主站蜘蛛池模板: 七台河市| 会同县| 忻州市| 商洛市| 承德市| 远安县| 体育| 衢州市| 嵩明县| 莫力| 垣曲县| 灌云县| 南丰县| 陆川县| 大名县| 陆河县| 渭源县| 龙胜| 司法| 获嘉县| 武城县| 宜阳县| 安阳县| 辽宁省| 华安县| 松江区| 屏边| 美姑县| 英山县| 邯郸市| 留坝县| 广宁县| 通河县| 盐津县| 伽师县| 临沭县| 兰坪| 呈贡县| 延安市| 新密市| 宁都县|