You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
AutoLOD has a performance bottleneck on assembly reload due to the following call hierarchy
AutoLOD..ctor() (Called because it has [InitializeOnLoad])
AutoLOD.UpdateDependencies()
AutoLOD.get_meshSimplifierType()
AutoLOD.get_meshSimplifiers()
ObjectUtils.GetImplementationsOfInterface()
ObjectUtils.GetAssignableTypes()
From there on, AutoLOD iterates over every type of every loaded assembly, which is very time consuming.
This is precisely why Unity introduced the TypeCache API. With it, we can remove the ForEachType and ForEachAssembly routines in AutoLOD (used in 3 places), thus greatly increasing its startup performance.
Here's my reimplementation of ObjectUtils.GetAssignableTypes(), for example:
AutoLOD has a performance bottleneck on assembly reload due to the following call hierarchy
From there on, AutoLOD iterates over every type of every loaded assembly, which is very time consuming.
This is precisely why Unity introduced the TypeCache API. With it, we can remove the ForEachType and ForEachAssembly routines in AutoLOD (used in 3 places), thus greatly increasing its startup performance.
Here's my reimplementation of ObjectUtils.GetAssignableTypes(), for example:
The text was updated successfully, but these errors were encountered: