Jump to content

Improve iteration time in editor


ben-FLOAT

Recommended Posts

We've been looking to improve our iteration times, and while profiling found VIU causing a large slowdown. We are using Unity 2018.4.0 and VIU 1.10.4.

The main cause seems to be searching the file system in SymbolRequirement.Validate(). Attached is a screenshot of a deep profile. Without deep profile, the delay is about 9500 ms.

More info: Simulator is only device enabled in VIU Settings. The scene has one moving cube in it. The PC has SSD hard drives. The spike shown here happens a frame or two after the startup.

Ideally, SymbolRequirement.Validate() would not be done at all when playing in editor (perhaps only on changing VIU settings or build settings?)

VIU_editor_deep_profile.PNG

Link to comment
Share on other sites

  • 2 weeks later...

I've confirmed this occurs on the latest 1.10.6 with a project having a substantial number of folders on disk. Our project has 20000+ files and 2000+ folders.

I setup a new project, imported VIU 1.10.6, latest SteamVR and Oculus. Play in editor was responsive. After generating 10000 txt files, there was a small lag, but not a big problem.

However, after generating 1000 folders running "For /L %i in (1,1,500) do mkdir folder_%i" a few times, a 4.5 second lag occurs a few moments after the scene becomes active. See the attached screenshot.

I've uploaded the test project here: https://drive.google.com/file/d/1SuFDpR-L6_6kbS11GbyYLbikZvaGJUMe/view?usp=sharing

viu_editor_folderslowdown.PNG

Link to comment
Share on other sites

  • 2 weeks later...

Any thoughts on this? This problem looks like it would affect all medium and larger size projects. @chengnay @Dario

For now I am disabling Validate() on my machine until I need to switch platforms, but that's a hack. Perhaps a workable fix would be to run the full file scan whenever Unity starts up, but then uses https://docs.microsoft.com/en-us/dotnet/api/system.io.filesystemwatcher?view=netframework-4.8 to watch for changes in *.cs files and if so, triggering Validate(). This would fix iteration time for designers at least, though programmers would still be slowed down...

Link to comment
Share on other sites

  • 2 years later...

Unity gives you the option of disabling either Domain Reload, Scene Reload, or both. This can speed up entering and exiting Play mode. Just remember that if you plan on making further script changes, you need to re-enable Domain Reload. Similarly, if you modify the Scene Hierarchy, you should re-enable Scene Reload. You can doing different tasks with the help of quality video editor like alight motion mod apk .

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...