jacobdufault / fullinspector

Full Inspector supercharges Unity's inspector
MIT License
111 stars 27 forks source link

tkControl performance improvements #198

Closed SugoiDev closed 7 years ago

SugoiDev commented 7 years ago

Improved tkControl perfomance by making it use InspectedType.Get(type).GetMembers() (cached) instead of type.GetDeclaredMembers(). Also create a filter for the types that tkControls are interested (IEnumerable<tkIControl> and tkIControl).

This has a dramatic impact thanks to caching.

Without this, having a collection of types that have tkControls could take a long time to show for the first time. Plus, creating a new inspector for the same type would be just as slow as the first one (no reuse).

With this, creating the first one is already fast, but the next ones are even faster.

jacobdufault commented 7 years ago

Thanks!