I am wondering if there is a better way to display a huge number of entries (1k+, or 1m+) in an area with a scroll than using GUI(Layout).BeginScrollview which get slower the more entries you have, even if only ten labels are actually displayed.
The only alternative I found is to use a slider instead of a scrollview and to display only an interval, like from slider-5 to slider+5. However, I'm not quite satisfied with that solution. Visually, it's not a smooth transition but the label just appear and disappear according to the interval. If a text is to long for the area, you won't be able to read it no matter what.
Any ideas ?
asked Mar 18 '12 at 05:30 PM
I had this issue some time ago. I solved it by using a fix-size item height. That way you can calculate which items are visible. I still used GUILayout, but I replaced all non-visible items with a single GUILayout.Space().
If you're interested, you can download my editor script for searching unused assets here. It's still under development, but it works very well. The only thing that's a bit of a problem is that GUILayout can't calculate the width of all items since i display only the visible ones. If your content doesn't change you can precalculate the max width at start.