Get the App
SLTechnology News&Howtos  ›  Development  › 

How does unity find the cause of performance problems

Shulou Source: shulou.com Published: 2022-06-03 04:37:36 10月03日 Update

Editor to share with you unity how to find the causes of performance problems, I believe that most people do not know much about it, so share this article for your reference, I hope you can learn a lot after reading this article, let's go to understand it!

This time, let's talk about the performance problem finding method of mono memory.

Mono is mainly a code problem, and various solutions will be talked about elsewhere, starting with solving each peak, which can lead to problems such as gc,mono heap memory requests.

1. Use cube to test first.

Run a round on the mobile phone and check the data.

You can see that the memory is applied here, and you can see. At this time, first of all, there is a downward spike, and this is the execution of a gc. Then mono found that the memory requested in your code has exceeded the current heap memory, so you can only apply for one more piece.

So after this, we need to find out what we are doing at this moment.

two。 Use Profiler to measure

At this time, run the previous round on editor. Probably find the same location.

Corresponding to the diagram of cube above, you can find the corresponding location of profiler.

You can roughly find out where the memory is being applied for.

Or at this time, you can also use uwa tools to test.

Also run the game and upload data

Find the function corresponding to the consumption

The above is all the content of the article "how to find the cause of performance problems in unity". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

Tags: Memory problems performance articles reasons code location content spikes data same not much functions places most that is tools mobile phones solutions methods Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Microsoft OPPO Reno Shulou Information Shulou Tech Info NVidia