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

Focusing on the issue

This category may seem redundant, given that we've already covered reducing noise. All we should have left is the issue at hand, right? Not exactly. Focus is the skill of not letting ourselves become distracted by inconsequential tasks and wild-goose chases.

You will recall that profiling with the Unity Profiler comes with a minor performance cost. This cost is even more severe when using the Deep Profile option. We might even introduce more minor performance costs into our application with additional logging. It's easy to forget when and where we introduced profiling code if the hunt continues for several hours.

We are effectively changing the result by measuring it. Any changes we implement during data sampling can sometimes lead us to chase after non-existent bugs in the application when we could have saved ourselves a lot of time by attempting to replicate the scenario without additional profiling instrumentation. If the bottleneck is reproducible and noticeable without profiling, then it's a candidate for beginning an investigation. However, if new bottlenecks keep appearing in the middle of an existing investigation, then keep in mind that they could be bottlenecks we introduced with our test code and not an existing problem that's been newly exposed.

Finally, when we have finished profiling, completed our fixes, and are now ready to move on to the next investigation, we should make sure to profile the application one last time to verify that the changes have had the intended effect.

主站蜘蛛池模板: 玛纳斯县| 沾化县| 澎湖县| 福州市| 萍乡市| 阜康市| 刚察县| 荣昌县| 长兴县| 桑日县| 兖州市| 北票市| 贺兰县| 磴口县| 绵阳市| 新疆| 乐业县| 巴东县| 运城市| 信宜市| 卢龙县| 庄河市| 昌宁县| 丰台区| 丽水市| 蒙山县| 连南| 孟州市| 霍邱县| 庆元县| 兰西县| 尉氏县| 绵阳市| 宁津县| 滕州市| 岳阳市| 开封县| 无锡市| 化德县| 香河县| 左云县|