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

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.

主站蜘蛛池模板: 惠州市| 兴化市| 荣成市| 阜平县| 河北省| 兴和县| 资兴市| 济宁市| 莱西市| 浮梁县| 溧水县| 朝阳区| 沙田区| 自贡市| 舞钢市| 晋城| 拉萨市| 郓城县| 乌鲁木齐县| 克东县| 剑河县| 湖州市| 方山县| 淅川县| 建始县| 兴和县| 饶河县| 嘉定区| 巫溪县| 山阴县| 乾安县| 开封市| 新宁县| 广州市| 什邡市| 阳朔县| 澄江县| 汉沽区| 迁安市| 仁寿县| 永济市|