So after testing some inventory items I noticed there was a noticeable pause in the frame rate when I attempted to load a list larger than 25 items. My project is estimated to have upwards of 150 items in a single list so I decided to simulate this and by god, It took at least 2-3 seconds to show. This is not ideal performance, especially considering my project is entirely 2d.
After looking into this I discovered this lag happens because the entire list if being dumped into memory all at once. The smart way to handle large list would be to implement a
Recyclable Scroll Rect.
https://github.com/MdIqubal/Recyclable-Scroll-Rect
Recyclable Scroll Rect reuses or recycles the least number of cells required to fill the viewport. As a result a huge number of items can be shown in the list without any performance hit.
I would like to request Ork/Makinom use
Recyclable Scroll Rect as its default method of handling lists. (the link above is just an example of the behavior I'm speaking about you can create your own method that works with your ecosystem) Data management is the bread and butter of RPGs and being able to efficiently display that data is the bare minimum of what players expect. (why this isn't default behavior in unity, I have no idea)
I'm not sure how to implement this myself, I believe Ork/Makinom handles the creating of prefabs. But I know for sure I can't finalize my project with such slow menu list performance.
For anyone else reading this, I hope we can come up with a solution since this pretty much effects everyone making a data heavy game.
I can't really use that as a default method, but you can just replace the scroll rect that's created with the custom one on your prefab. Since it descends from ScrollRect it should be working without any issue.
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
I need to go back and do some restructuring for my assets, the closer I can get to bare bone with the input prefabs, the better. After examining Recyclable Scroll Rect more I don't believe it can work with Ork/Makinom without changing how the data is displayed on the input. Since a hand full of inputs will be recycled, they would next to change the data based on the list index as the user scrolls. I have no idea how to do that. lol