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

  • Unity Game Optimization
  • Dr. Davide Aversa Chris Dickinson
  • 255字
  • 2021-06-24 12:12:56

Deep Profile

Ordinary profiling will only record the time and memory allocations made by common Unity callback methods, such as Awake(), Start(), Update()and FixedUpdate(). Enabling the Deep Profile option recompiles our scripts with a much deeper level of instrumentation, allowing it to measure each and every invoked method. This causes a significantly greater instrumentation cost during runtime than normal, and uses substantially more memory since data is being collected for the entire callstack at runtime. As a consequence, deep profiling may not even be possible in large projects, as Unity may run out of memory before testing even begins, or the application may run so slowly as to make the test pointless.

Note that toggling Deep Profile requires the entire project to be completely recompiled before profiling can begin again, so it is best to avoid toggling the option back and forth between tests.

Since this option blindly measures the entire callstack, it would be unwise to keep it enabled during most of our profiling tests. This option is best reserved for when default profiling does not provide sufficient detail to figure out the root cause, or if we're testing the performance of a small test scene, which we're using to isolate certain activities.

If deep profiling is required for larger projects and scenes, but the Deep Profile option is too much of a hindrance during runtime, then there are alternative approaches that can be used to perform more detailed profiling; see the upcoming section entitled Targeted profiling of code segments.

主站蜘蛛池模板: 双峰县| 广汉市| 桂东县| 阜城县| 环江| 西和县| 莆田市| 秦皇岛市| 潞城市| 吉木萨尔县| 雷州市| 贵州省| 丹棱县| 沙洋县| 军事| 射阳县| 南丹县| 虎林市| 鄂州市| 长沙县| 长沙市| 隆回县| 贞丰县| 柳江县| 白水县| 富源县| 连山| 繁昌县| 友谊县| 都江堰市| 蒙阴县| 昂仁县| 得荣县| 屏东县| 财经| 牡丹江市| 大余县| 万宁市| 祥云县| 宁陕县| 安达市|