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

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.

主站蜘蛛池模板: 延庆县| 丹凤县| 伊金霍洛旗| 泸州市| 襄城县| 宁城县| 扶风县| 盘山县| 卓尼县| 泽库县| 齐河县| 平潭县| 柘城县| 永吉县| 鞍山市| 保德县| 宁明县| 嵊泗县| 安多县| 天台县| 龙里县| 曲靖市| 金堂县| 东海县| 托克逊县| 华安县| 五原县| 武义县| 卓资县| 宝山区| 公主岭市| 广丰县| 鹤壁市| 南岸区| 钦州市| 托里县| 称多县| 灵宝市| 株洲市| 同德县| 彭泽县|