neon-age / Smart-Hierarchy

Human-friendly hierarchy for Unity.
MIT License
599 stars 43 forks source link

[Fixed] Unacceptably poor performance with HUGE hierarchies #1

Closed neon-age closed 3 years ago

neon-age commented 3 years ago

This is caused by TreeView.FindItem() which goes throw whole hierarchy many-many times for each instanceId.

There is no optimal optimization for this method, so instead we better get all TreeView items and go throw each visible element manually.

neon-age commented 3 years ago

Fixed. Changed recursive FindItem to GetRow and GetItem. Also invokes only when TreeView is being reloaded