Hi, I have a larger project that I am currently refactoring towards DOTS. It is going to take many iterations and because I now consider the iteration speed the biggest hinderance to my progress as well as my mental health I would like to improve them somehow. I used AsmdefDebug from https://gist.github.com/karljj1/9c6cce803096b5cd4511cf0819ff517b to get some data: Compilation Report: 29,52 seconds 1,45s CommonUnity.dll compilation total: 1,45s Assembly Reload Time: 28,0762579s My project is split into about 40 assemblies with serviceable dependencies and compile times are fine. However assembly reload is just crazy. The worst is, that it is focus breaking. I don't have much trouble waiting for 10s, but with three times that, I am often tempted to fill the time by doing something else and before I know it, ten minutes of productive time are gone and my mental context is in shambles. So I continued with Editor Iteration Profiler and found this: One of the hefty calls is InitializeAllComponentTypes under TypeDependencyCache. It dwarfs everything else, but BurstLoader is not too fast either. I assume that this is not normal, so my question is, why would something like this be happening? What can I do, to fix this? Any help is welcomed!
Hi @Knedlo - which version of the Burst package, and which version of Unity, are you using? We did make a number of improvements to BurstLoader's domain reload time, making it roughly an order of magnitude faster, and the time you're seeing there looks more like the old slow time than the new fast time. Those improvements require Unity 2019.3+ and Burst 1.4+. If you have both of those, then it might be something else... can you expand the BurstLoader tree node from that screenshot in case there are some child nodes that reveal something useful?
Don't see this code used anymore in the official Unity versions. Which version are you using? Could try on a newer/updated version? The Scripting Team and other teams at Unity are gearing up to improve iteration time.
Hi @tim_jones and @xoofx Thanks for the info. I'm running Burst 1.4.1 with Unity 2020.3.5f1. I am not using newer version of Unity as it is supposed to be incompatible with Entities. Here's a screen of the expanded BurstLoader:
Also I should add some more info. I am currently using couple of managed components. I queried the code base and total numbers are: Managed components: 7 (lowering the number of managed components didn't change anything noticable) Unmanaged components: 42 Systems: 19 Executable lines of code: about 10k Defined types: about 1k (I am evaluating switching to ECS, that's why the number of systems and components is so low compared to the whole) My system during the measuring was running on i7-2600k, 32GB and SSD. Since than I upgraded to Ryzen9 3900X. Measurements on upgraded machine looks like this: It is better, sure, but the feeling that this is not right remains.
I have tried to reinstall all packages with latest versions. I also cleaned up unused packages. Currently the editor profiler sees this: @tim_jones does it tell you anything?
@xoofx I am adding content of my manifest.json. Any idea why an obsolete code would be called? The Unity version is still the latest LTS (Unity 2020.3.5f1) Code (JavaScript): { "testables": [ "com.unity.entities", "com.unity.collections", "com.unity.jobs", "com.unity.test-framework.performance" ], "dependencies": { "com.unity.2d.sprite": "1.0.0", "com.unity.addressables": "1.18.4", "com.unity.analytics": "3.5.3", "com.unity.burst": "1.4.8", "com.unity.collections": "0.15.0-preview.21", "com.unity.editoriterationprofiler": "0.1.1-preview", "com.unity.entities": "0.17.0-preview.41", "com.unity.ext.nunit": "1.0.6", "com.unity.ide.visualstudio": "2.0.8", "com.unity.inputsystem": "1.0.2", "com.unity.render-pipelines.universal": "10.4.0", "com.unity.rendering.hybrid": "0.11.0-preview.42", "com.unity.shadergraph": "10.4.0", "com.unity.test-framework": "1.1.24", "com.unity.testtools.codecoverage": "1.0.0", "com.unity.textmeshpro": "3.0.6", "com.unity.ugui": "1.0.0", "com.unity.ui": "1.0.0-preview.14", "com.unity.ui.builder": "1.0.0-preview.14", "com.unity.modules.ai": "1.0.0", "com.unity.modules.androidjni": "1.0.0", "com.unity.modules.animation": "1.0.0", "com.unity.modules.assetbundle": "1.0.0", "com.unity.modules.audio": "1.0.0", "com.unity.modules.cloth": "1.0.0", "com.unity.modules.director": "1.0.0", "com.unity.modules.imageconversion": "1.0.0", "com.unity.modules.imgui": "1.0.0", "com.unity.modules.jsonserialize": "1.0.0", "com.unity.modules.particlesystem": "1.0.0", "com.unity.modules.physics": "1.0.0", "com.unity.modules.physics2d": "1.0.0", "com.unity.modules.screencapture": "1.0.0", "com.unity.modules.terrain": "1.0.0", "com.unity.modules.terrainphysics": "1.0.0", "com.unity.modules.tilemap": "1.0.0", "com.unity.modules.umbra": "1.0.0", "com.unity.modules.unityanalytics": "1.0.0", "com.unity.modules.unitywebrequest": "1.0.0", "com.unity.modules.unitywebrequestassetbundle": "1.0.0", "com.unity.modules.unitywebrequestaudio": "1.0.0", "com.unity.modules.unitywebrequesttexture": "1.0.0", "com.unity.modules.unitywebrequestwww": "1.0.0", "com.unity.modules.vehicles": "1.0.0", "com.unity.modules.video": "1.0.0", "com.unity.modules.vr": "1.0.0", "com.unity.modules.wind": "1.0.0", "com.unity.modules.xr": "1.0.0" }, "scopedRegistries": [ { "name": "OpenUPM", "url": "https://package.openupm.com", "scopes": [ "com.unity.editoriterationprofiler" ] } ] }