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

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.

主站蜘蛛池模板: 绍兴市| 瓦房店市| 中西区| 珲春市| 芦溪县| 霍邱县| 葵青区| 双鸭山市| 报价| 博兴县| 大丰市| 富平县| 霍邱县| 广汉市| 宁武县| 共和县| 茂名市| 绿春县| 甘孜| 双江| 安义县| 中西区| 长白| 宝应县| 青岛市| 若尔盖县| 五家渠市| 海城市| 大英县| 秦安县| 陇西县| 承德市| 巢湖市| 汕尾市| 静宁县| 通江县| 贵南县| 炉霍县| 江达县| 岳阳市| 乡城县|