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

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.

Recall that profiling with the Unity Profiler comes with a minor performance cost. This cost is even more severe when using the Deep Profiling 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 to begin 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.

主站蜘蛛池模板: 巴彦县| 奉新县| 康马县| 益阳市| 嵊州市| 安顺市| 和田县| 霍林郭勒市| 酒泉市| 保康县| 石家庄市| 鹤壁市| 康保县| 肃北| 讷河市| 安化县| 双辽市| 沐川县| 南京市| 灵台县| 海城市| 南昌县| 香格里拉县| 樟树市| 苏州市| 汕尾市| 江口县| 巴彦淖尔市| 德钦县| 淮阳县| 宿州市| 苏尼特右旗| 建湖县| 嘉兴市| 万山特区| 二手房| 剑川县| 治县。| 昌邑市| 朔州市| 木里|