# Analyse a log

**URL:** https://discussions.unity.com/t/analyse-a-log/1580591
**Category:** Unity Editor
**Tags:** Unity-Editor, 2022.3-lts, Question
**Created:** [January 7, 2025, 3:54pm UTC](https://discussions.unity.com/t/analyse-a-log/1580591 "2025-01-07T15:54:59Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![stigmamax](https://dub1.discourse-cdn.com/unity/user_avatar/discussions.unity.com/stigmamax/32/89103_2.png) [@stigmamax](https://discussions.unity.com/u/stigmamax)
#### Post date: [January 7, 2025, 3:54pm UTC](https://discussions.unity.com/t/analyse-a-log/1580591/1 "2025-01-07T15:54:59Z")

</div>

Analyze a log

Here, I have about ten scenes but one takes 10 times longer to open than the others whether in the editor or in the exe, while it is not loaded with more objects.  
I isolated the log file of this scene: [www.maximages.fr/download/Omanah/Editor.zip](https://www.maximages.fr/download/Omanah/Editor.zip)  
I had heard of an AI that analyzed these Unity logs but I found nothing.

---

<div class="post-metadata">

### Author: ![Kurt-Dekker](https://dub1.discourse-cdn.com/unity/user_avatar/discussions.unity.com/kurt-dekker/32/101578_2.png) [@Kurt-Dekker](https://discussions.unity.com/u/Kurt-Dekker)
#### Post date: [January 7, 2025, 10:44pm UTC](https://discussions.unity.com/t/analyse-a-log/1580591/2 "2025-01-07T22:44:48Z")

</div>

What have you learned through the profiler?

For all performance and optimization issues, ALWAYS start by using the Profiler window:

Window → Analysis → Profiler

Generally optimization is:

- avoid doing the thing that is slow (easiest)
- do it fewer times and store its result
- do the slow thing less frequently over time
- do the slow thing when nobody cares much (during level loading or in another thread, etc.)
- find a faster way to do the thing (hardest)

DO NOT OPTIMIZE “JUST BECAUSE…” If you don’t have a problem, DO NOT OPTIMIZE!

If you DO have a problem, there is only ONE way to find out: measuring with the profiler.

Failure to use the profiler first means you’re just guessing, making a mess of your code for no good reason.

Not only that but performance on platform A will likely be completely different than platform B. Test on the platform(s) that you care about, and test to the extent that it is worth your effort, and no more.

Do not blindly reach for multi-threading or async… understand your performance problems first:

> [@Multithreading or similar in Unity?](https://discussions.unity.com/t/multithreading-or-similar-in-unity/833577/12):
>
> Almost universally when I see people (EDIT: people in this forum using Unity3D) reaching for multithreading or multitasking, this is what happened: I have a game idea I tried a simple brute force implementation oh my gosh it is unbelievably slow on mobile go to the internet and google read “multithreading can make programs faster!” Now people go to their Unity project with this one giant multitasking hammer they found and start smashing everything flat with it, making everything multithreaded…

> [@Is it still worth optimizing square roots in 2021+?](https://discussions.unity.com/t/is-it-still-worth-optimizing-square-roots-in-2021/841163/2):
>
> It depends on the target architecture and runtime library of course, as all computer code runs on the actual CPU where your game is running, not some “theoretical magical global CPU of today” construct. But in 2021 a floating point unit (FPU) is pretty standard on most targets. All that said, don’t do needless work, especially on mobile, as that just burns down battery life. If you suspect you have a performance bottleneck, DO NOT START MAKING OPTIMIZATION CHANGES!! Instead, start with the …

Remember that you are gathering information at this stage. You cannot FIX until you FIND.

Remember that optimized code is ALWAYS harder to work with and more brittle, making subsequent feature development difficult or impossible, or incurring massive technical debt on future development.

Don’t forget about the Frame Debugger window either, available right near the Profiler in the menu system.

Notes on optimizing UnityEngine.UI setups:

> [@How to efficiently copy transform data into an array](https://discussions.unity.com/t/how-to-efficiently-copy-transform-data-into-an-array/846847/2):
>
> Just so you know, the entire UnityEngine.UI system is available in source control from the package manager (and from github) and you can look at it and probably see there isn’t going to be a lot of fat. If there are some particular specific widgets you use in there that are too slow because of the use-generalization assumptions made, you might be able to get some benefit by tweaking them, but since so much of mobile performance bumps against pixel fill bounds, it’s unlikely to get you much ben…

When you are investigating a performance concern, you may even need to create custom tooling or scripts to clearly expose the issue and help you reason about possible solutions. This may even involve making special instrumented builds of your game capable of running on the actual problematic target hardware.

At a minimum you want to clearly understand what performance issues you are having:

- running too slowly?
- loading too slowly?
- using too much runtime memory?
- final bundle too large?
- too much network traffic?
- something else?

If you are unable to engage the profiler, then your next solution is gross guessing changes, such as “reimport all textures as 32x32 tiny textures” or “replace some complex 3D objects with cubes/capsules” to try and figure out what is bogging you down.

Each experiment you do may give you intel about what is causing the performance issue that you identified. More importantly let you eliminate candidates for optimization. For instance if you swap out your biggest textures with 32x32 stamps and you STILL have a problem, you may be able to eliminate textures as an issue and move onto something else.

This sort of speculative optimization assumes you’re properly using source control so it takes one click to revert to the way your project was before if there is no improvement, while carefully making notes about what you have tried and more importantly what results it has had.

“Software does not run in a magic fairy aether powered by the fevered dreams of CS PhDs.” - Mike Acton

---

<div class="post-metadata">

### Author: ![stigmamax](https://dub1.discourse-cdn.com/unity/user_avatar/discussions.unity.com/stigmamax/32/89103_2.png) [@stigmamax](https://discussions.unity.com/u/stigmamax)
#### Post date: [January 11, 2025, 3:11pm UTC](https://discussions.unity.com/t/analyse-a-log/1580591/3 "2025-01-11T15:11:37Z")

</div>

I noticed that the 2 long scenes to load (I have 9 scenes) have the Digger asset.
