Hello guys,
I've been working on an Android/iOS app which unfortunately has several performance issues on a Page showing detailed status information.
I'm a desktop developer mainly using WPF and this is my very first Xamarin.Forms app. This is probably the reason I designed the page in a completely wrong way.
Page
Basically the page consists of 4 sections:
See the page wireframe
- A header section with a thumbnail image, a headline and a button
- A large multiline label with bold/italic formatted strings
- A date picker
- A list of complex views
Coming from a WPF background, I put all of the sections in a giant vertical StackLayout which itself resides in a ScrollLayout.
Section 4 can get pretty long on some circumstances. It basically is another StackLayout that may contain up to 80 stacked Views (worst case).
Each of these 80 views is a custom Grid control I wrote myself.
Basically I need to display a list of some status in each view. See this wireframe for an idea of how it looks like:
View wireframe
Group and entry count is determined on runtime. 3 groups / 15 entries is an example.
But there is some logic behind. As all entries in Group B are OK, the whole group shrinks to a single line:
Grouped view wireframe
Question
Eventually I realized that this Desktop driven page design kills my app. If there are 80 views to be displayed, each containing ~15 checkmark or error icons, performance is doomed to be bad. So I started to read articles and realized that there are neat controls like RecyclerView on Android or Xamarin.Forms ListView with recycling caching strategy.
Now this boils down to my question: What options do I have to improve performance on displaying such a page?
Probably not loading Views if they're not in the viewport seems to be the best way (isn't it called Lazy Loading?).
Do I have to use ListView for lazy loading?
Is it wise to go for recycling strategies while having different sections and views? Remember, due to grouping, Views in section 4 aren't guaranteed to look the same.
I'd love to hear from your expertise.