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

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.

主站蜘蛛池模板: 淮北市| 平谷区| 晋宁县| 淳安县| 治县。| 阳春市| 沛县| 皮山县| 嘉鱼县| 开原市| 贡山| 宜春市| 乌兰县| 铜陵市| 江陵县| 廊坊市| 象山县| 兴海县| 邹城市| 沁源县| 会理县| 临猗县| 冷水江市| 阳新县| 天祝| 三河市| 高雄县| 白玉县| 平乐县| 郁南县| 舟曲县| 泊头市| 喜德县| 会理县| 白沙| 衡山县| 申扎县| 纳雍县| 东丽区| 顺平县| 巴楚县|