GOT Online|Decipher Game Performance Optimization Cheats

With the continuous iteration of UWA GOT Online functions, GOT Online provides a wealth of efficient, accurate and convenient data acquisition methods and analysis for solving various game performance problems (such as memory usage, CPU time consumption, GPU time consumption and freeze) suggestion. This article summarizes the key optimization points in GOT Online (SDK version 2.4.7), covering data acquisition, data analysis, and performance optimization. No matter what level of engineer you are, this article is a treasure book worth studying carefully.

read guide

  1. Caton optimization 
  2. GPU optimization 
  3. memory optimization
  4. Lua performance optimization
  5. energy optimization
  6. More optimization items to improve user experience

Caton optimization

Stuck analysis
Under the stall point analysis function, UWA lists all the freeze frames during the running process in the time-consuming curve of each frame. Select any stuck point to view the detailed data of this frame. In addition to time consumption, proportion, and number of calls, you can also clearly see the progress of the main thread and sub-threads in Timeline, which is convenient for developers to analyze the time consumption of these abnormal nodes in detail.

Under the key function analysis tab, UWA classifies and integrates the key functions that are prone to freezes during the test process, so that developers can more efficiently troubleshoot the freezes in the project and locate the cause of the freezes.

>> How to quickly locate your Caton

>> Stuck analysis interface: key function analysis and stuck point analysis

>> GPU Counter, Timeline function

Resource management
Under the resource management module, UWA lists the loading time and frequency of each resource. Developers can accurately locate which resource is causing the time-consuming bottleneck, and view the loading/unloading of each resource, each GameObject Specific time-consuming situations such as instantiation/activation of .

>> Resource management module in GOT Online Resource mode

In the Resource mode, or when the Resource mode is turned on in the Overview mode, check the resource management module, and you can view the four modules of AssetBundle loading & unloading, resource loading & unloading, and resource instantiation & activation in the resource management module.

On the resource management summary interface, UWA directly lists the time-consuming and frequent TOP 10 problematic resources that need attention. By quickly processing these key objects, immediate optimization effects can be achieved in a short period of time. At the same time, you can also focus on analyzing the usage of different loading interfaces. For example, in the "Resource Loading & Unloading" interface, users can see which AssetBundle the loaded resource belongs to, which interface is used, and the time-consuming and times of loading.


GPU optimization

SoC information
Under the SoC GPU information module, developers can monitor the GPU running status of the device from a more macro perspective. While observing the GPU running status and judging whether there is GPU frequency reduction, developers can also quickly locate the high pressure on the GPU. For more targeted scenarios, further analyze the sources of performance pressure in these scenarios.

>> GPU articles: SoC GPU information, GPU Counter performance indicators

GPU Counter
After continuous improvement and iteration of the GPU Counter function, the GPU Counter module has supported Mali, Adreno, and PowerVR three brand chip devices, including nine important GPU parameter modules. Developers can use GPU time consumption and GPU activity to locate the performance bottlenecks of which scenes of the project come from the GPU, and use detailed parameters such as GPU coloring, bandwidth, and primitives to more efficiently and conveniently locate GPU pressure sources and formulate performance standards.

>> GPU Counter, Timeline function

>> Mali GPU Counter module adds GPU primitive processing and GPU Shader Cycle

>> GPU Counter supports Adreno, PowerVR chip

>> SoC GPU information, GPU Counter performance indicators


memory optimization

PSS Memory & Memory Occupancy & Resource Memory
In the PSS memory module under the running information page, developers can view the PSS memory data during the test, combined with the resource memory data, to manage and control the crash risk of the project.

On the memory usage page, developers can quickly overview the memory usage and trends of various resources such as textures, grids, animations, and audio in the project, understand the memory distribution of the project, and subdivide and locate which resources have problems, which greatly saves one by one. The time for resource checking.

On the resource memory page, UWA will display the specific information of resources to varying degrees according to whether the Resource mode is turned on during the test, whether it is manually dumped, etc. Under this page, developers can obtain the same comprehensive resource data as the Resource mode while collecting the data in the Overview mode.

>> PSS video memory, memory usage, heap memory object snapshot

>> Memory articles: PSS video memory, memory usage, heap memory object snapshot

>> GOT Online supports multi-mode acquisition, Mono analysis supports IL2CPP packaging

When the Resource mode is not turned on during the test, the resource statistics module will count the mainstream textures, grids, Shaders, fonts, RenderTextures, particle systems, etc. The number and size of resources; and when the Resource mode is turned on, the usage details of the above resources will be collected in more detail.

Taking texture resources as an example, after enabling Resource mode, you can get the memory usage, peak quantity, width, height, life cycle, and whether R/W is enabled and other properties of texture resources in the report, so that developers can make adjustments to the usage of textures. Troubleshoot in more detail.

When you find problems with Mono in Overview mode, you can use Mono mode to analyze the allocation and residency of Mono in detail.

Multi-thread statistics Mono allocation
Mono mode can also obtain the heap memory allocation of sub-threads in addition to the main thread. Using the Mono mode, developers can more comprehensively analyze the Mono allocation and residency of the project, and can use sub-threads to share the performance pressure of the main thread with more confidence.

>> Multi-thread statistics

Mono reverse call analysis
Under the specific heap memory allocation module, you can use the reverse call analysis function to check the Mono allocation. Developers can use this function to more easily locate the deep sub-functions that allocate Mono heap memory and locate the bottleneck of memory problems.

>> Mono heap memory reverse call analysis

Resident heap memory allocation functions
Under heap memory leak analysis, you can view the top 10 functions of resident heap memory allocation. By comparing the memory changes between two samples, developers can quickly capture specific leaked functions, leaked specific memory and variable data.

>> The hidden tricks in the new version of GOT Online

Heap memory object snapshot
Through the heap memory object snapshot, developers can sample the heap memory objects in the scene in detail. While having an intuitive understanding of the Mono resident problem in the scene, efficiently lock the Mono heap memory bottleneck and start optimizing.

>> heap memory object snapshot

The "Resident Heap Memory Allocation Function" and "Heap Memory Object Snapshot" pages in "Heap Memory Leak Analysis" are convenient for developers to analyze the resident status of heap memory objects at runtime in detail.

During the test, according to the Dump rules set before the test starts, UWA will collect data on the heap memory objects at every fixed interval frame or manual dump.

Developers can quickly locate heaps that need to be optimized from the two dimensions of "heap memory object size" and "heap memory object number" in the heap memory object histogram on the "heap memory object snapshot" page Memory residency issues.

The heap memory object is divided into two parts: managed object and memory fragmentation. Memory fragmentation includes "free activated memory" and "free fragmented memory". When allocating heap memory, the available memory blocks in the "free active memory" will be used first, and then the available memory blocks will be searched from the "free fragmented memory".

Below the histogram, the managed object size, total number of object types, number of object types, and memory fragmentation ratio of all types of selected frames will be displayed. The pie chart on the right will show the top 10 and other types of objects and their proportions, so that developers can have a more intuitive understanding of the heap memory objects in this frame and quickly lock the Mono heap memory bottleneck.

At the same time, in the object type table below the pie chart, the type, size, proportion, number of objects and other information of all objects in this frame will also be displayed. After expanding the object type, the developer can quickly locate all functions that call this object type and the reverse call path of the selected function.

Through this table, you can more precisely locate the source of the heap memory allocation, and optimize the heap memory allocation more efficiently by searching for the corresponding subfunction in the code.


Lua performance optimization

Lua performance analysis
In the Lua report, developers can see the overall heap memory, the specific allocation of heap memory, and the data referenced by Mono objects during the test. Developers can analyze the allocation and occupancy of the Lua memory of the project in this tab .

>> Lua, it's time to have a walk with you!

>> UWA supports Lua CPU time-consuming analysis

Lua reverse call analysis
The Lua report supports reverse call analysis. Under the reverse call analysis page, developers can directly locate the lowest-level Lua stack, pick out the most time-consuming and most allocated instigators at a glance, and solve problems efficiently.

>> The hidden tricks in the new version of GOT Online

In the reverse order mode, the expanded direct function list of a node is the parent function that calls the node function and generates heap memory, so you can directly locate the bottom-level reason, and you don’t have to worry about bottomless The stack without a brain "little bit" anymore.

Mono object reference
Under the Mono object reference module, developers can visually view the number and trend of variable objects that have been destroyed on the Mono side but still indexed on the Lua side, and compare the sampling points through the comparison mode, which is more convenient Locate the memory leak problem of the C# layer.

>> Lua code optimization

In any Lua plug-in, there is a similar mechanism: maintain a Cache in the C# layer to refer to those C# layer objects accessed by Lua to prevent the following problems: when the C# object is accessed again in Lua, the object It may have been recycled by the GC of the C# layer, resulting in logic errors. Therefore, always retaining a reference to a C# layer object in Lua will cause it to fail to be released. When there are more and more such references, it will cause a memory leak in the C# layer.

In order to facilitate users to troubleshoot this situation, we summarize the above-mentioned C# layer objects in the Cache on the report page of the Mono object reference, and count the object types that appear in the Cache and the total number of objects of each type. When the object inherits from UnityEngine.Object, it will also count the number of objects of this type that have been destroyed, as shown in the following figure:

Therefore, an easy way to determine whether a Lua reference is causing a Mono leak is to check whether the total number of Destroyed is zero. Because it represents the total number of variables that have been destroyed on the Mono side but still indexed on the Lua side, which should tend to 0 in theory. If it continues to be high, or even has a rising trend, then there is a high probability that it has been leaked, as shown in the figure below:

For some types of objects whose number keeps rising, including the number and trend of Destroy, you can also compare the object references at two different sampling points under the chart to further locate unreasonable references in Lua and analyze the rationality of the increment.

Supplementary Note: Regarding the need to check for leaks, it is recommended to test for a long time. After all, once a leak occurs, it will quickly become a tower.


energy optimization

Power
On the power consumption page, you can view the power data during the test. It is convenient for developers to analyze the power consumption of the project by observing the power and current of the device during the test.

>> GPU Counter function supports Adreno, PowerVR chip

Temperature Variation
On the Temperature Variation page, UWA supports CPU temperature, GPU temperature, and battery temperature data. Developers can use these hardware temperature conditions to locate the cause of device heating.

>> Mali GPU Counter module adds GPU primitive processing and GPU Shader Cycles


More optimization items to improve user experience

Custom Parameters
Use UWA custom parameters to intercept the code that needs to be analyzed, and then you can detect and track the code on the custom code segment and custom variable page under custom parameters. Through this function, developers can more flexibly locate code bottlenecks and feedback code problems.

>> Support custom variable and code segment detection

Function Interpretation Tips
Under the function stack of each module in the Overview report, UWA combined with rich optimization experience, UWA marked the common functions in the optimization process. With these thoughtful Tips, developers can quickly attribute and give rectification methods to improve the efficiency of optimization.

>> Comparative Analysis, Batches Quantity, Function Interpretation Tips

Under the function stack of each module in the Overview report, a new function definition Tips has been added. Combined with rich optimization experience, UWA has marked the common functions in the optimization process. Move the mouse to the "!" on the right side of the function name to view the function's definition, time-consuming source, optimization method and other information.

Comparative analysis
Through the shortcut entry on the right side of the report, you can conduct a comprehensive comparative analysis of different scenarios in the Overview report. While quickly locating problems, developers can conveniently and fully set up a monitoring process within the team, regularly summarize data on project performance, and form a more efficient and convenient closed-loop performance data monitoring.

>> Comparative Analysis, Batches Quantity, Function Interpretation Tips

Scene Segmentation
By using the scene segmentation function under Scene Overview - Scene Management, developers can count the time-consuming situation of specific scenes in a more refined manner for different scenarios, UI interfaces and other modules, further bringing convenience to data analysis.

>> Support resource loading analysis, scene segmentation

You can click the "Add Scene Separation Line" button in "Scenario Probability-Scene Management", enter the location of the division and the name of the scene, and you can see the latest data analysis on the page.


More UWA GOT Online usage skills are waiting for your exploration, and suggestions and demands are welcome! You can go to www.uwa4d.com for a free trial , and registered users can get 15 days of trial rights!

Guess you like

Origin blog.csdn.net/UWA4D/article/details/131825144