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

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.

主站蜘蛛池模板: 富顺县| 延吉市| 通城县| 莫力| 濮阳市| 罗城| 台前县| 八宿县| 原平市| 德清县| 平南县| 景宁| 孟连| 张北县| 夏邑县| 登封市| 武鸣县| 徐闻县| 上林县| 大埔县| 富民县| 玛曲县| 融水| 永宁县| 尖扎县| 九龙县| 阿坝县| 开封县| 密山市| 金华市| 沂源县| 海兴县| 合阳县| 寿阳县| 临夏县| 凭祥市| 宁海县| 秦安县| 黄石市| 东至县| 拉孜县|