Hello,
I have a list of GUI nodes that I want to display, there are ~60 of the.
Each node contains other nodes (several texts, one image).
I’m using Druid library to handle the scrolling.
On my device, the performance is really poor, it’s lagging as soon as I start scrolling.
What is the best practice for optimising performance?
Should I check if a GUI node is visible in screen, and therefore enable/disable it?
Should I “recycle” the nodes? (Similar to list adapters in native Android)
Would like to know what the trick is to display long scrollable lists.
In Goooey I have two kinds of lists: 1) Static - all elements of the list exist as nodes at all times 2) Dynamic - only as many nodes as can be visible are needed regardless of the length of the list.
Strange, I once made a match-3 game completely in GUI and with a table of 6x8 blocks and other GUI elements it was working on very low quality devices It was custom made and all the elements on the board where a cloned of one original node and have changed flipbook animations on the go (to red, green, yellow and so on). I also never actually tried Druid’s list, only Gooey’s and Gooey has dynamic list, so it is a direct solution to your problem. And I guess you should definitely try to disable nodes outside of the screen, if Druid doesn’t do it.
If you don’t want to go with Gooey dynamic list and can go with a custom list, you can make just enough nodes (with child nodes that you need) to cover the screen (+ one set for scrolling purpose - that if you scroll outside of the view, will be placed on the other site, e.g. on the bottom with updated data) and set texts or change flipbooks on the go, taking data from a table in script. Really rough sketch:
I assign every TEXT node to “layer3”.
I assign every image BOX to “layer2”.
I see 9 draw calls being drawn, and not 3.
I dont’ know if I should assign a layer to the parent nodes as well.
How should I organize my layers on this specific template? Help would be much appreciated.
Hello @Insality,
Any ETA for the dynamic list in Druid? I’m in a situation where it will be required to the amount of GUI nodes I will have to use (imagine a a list of 200 items, each items having several nodes…).
Just curious to see what’s the advancement on this topic,thanks!