Prefabs Lag

Issue #777 duplicate
The Code Hermit created an issue

Hi

I have noticed consistent lag on prefabs which have multiple scripts who use Odin. The example (gif and project) is reproduced with nested prefabs, but I have seen this even with single prefabs.

Here is a gif:

Basically every time I select the Hermit prefab, Odin starts to repaint no stop, resulting in 15 fps and lower. The Hermit prefab has 3 open scripts. I have cut down the whole project to only the essentials to reproduce the bug. So at the moment those scripts are basically empty, just having bunch of public variables and the “using Sierenix .Odininspector” on the top.

Closing the scripts from the inspector stops the lag. So does unpacking the prefab/s. I have noticed that after unpacking and then making a new prefab the bug disappears, but after a while (5 mins or 1+ hours … ) it comes back. Sometimes the repaint lasts for 3-4 secs, other times it lasts till you unselect the prefab as is the example project.

Unity version: Unity 2021.1.4f1 (64-bit)

OS: Windows: 10

Odin version: 3.0.5.0

Since Bitbucket doesnt allow me to upload the project here, I have uploaded it online
https://easyupload.io/gav2li

Comments (5)

  1. Tor Esa Vestergaard

    To give an update, we are still working on this, but solving it correctly and in a future-proof way is a problem of some algorithmic complexity, so we have not yet crafted a solution where we are happy with all the performance and memory characteristics.

  2. Tor Esa Vestergaard

    To reiterate what I posted on #733, we’ve now totally rewritten the way we handle and register Unity PropertyModifications on prefab instances to be far (far!) faster, but this has required a rather large rewrite and refactor of some internal parts of the property system to use string slices (increasing in some very nice speed-ups re: property path lookups) as well as the development of a new custom string lookup data structure, so we would like to verify this solution with a number of users before introducing it into the stable branch of Odin. If anybody would like to try out this fix and verify its stability, please contact me on Discord and I will send you a preview build ASAP 🙂

  3. Log in to comment