[Media] Performance comparison after lazy rendering large lists with GPUI
![[Media] Performance comparison after lazy rendering large lists with GPUI](https://i.redd.it/mc63vj0aelzg1.gif)
It was kind of unexpected how easy it was to virtualize lists in GPUI compared to literally doing anything else in it. To do it there's `gpui::uniform_list(...)` which takes in number of entries and a closure that does the processing at render time. Inside the closure uniform_list provides the range of rows that need to be rendered, then all i had to do was just use that range to look up my entries and then just render each of them how i want. All the heavy lifting is done by GPUI.
https://github.com/buildzaku/zaku/pull/7
You can see it struggling to render 10k entries at ~5FPS whereas after this change it stays 120FPS.
Since number of entires now doesn't matter as much as it did before, performance is same for 10k, 100k and 1M entries that i tested it with.
Repository: