Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 58056

Question regarding best practices for performance using Xamarin.Forms

$
0
0

Scenario:
I have a content page instance, in header is some sort of switcher - you can choose between ME and ALL.

If ME is chosen, it shows below scroll view with my news feed.
If ALL is chosen, it shows below scroll view with feed of all people.

Currently it's implemented this way: When I click on switcher, it determines which option is active, and fill Content property with: new instance of header and new instance of scrollview with data calculated from List structure.

It works great. But the thing is, that switching between options is kinda slow (tested on iPhone 4 and 5). It's not responsive as it should be, it take about 1-2 secs to rerender, how large the content of scrollview is has not much impact.

I was thinking about several things:
- storing whole Content property for each option in a cache. However I guess it's not gonna work since the delay is mainly from rendering.
- changing only content of scrollview instance ... not sure if it's possible since I run into many problems (but i still think it must work, however have no idea if it will bring some improvements)

The best would be having two ContentPage (because switching in tab bar is pretty quick, so I guess it would help) instances and just switching them, but it seems like it's not possible when I want to have this switcher in header.

Any help is appreciated. Thanks.


Viewing all articles
Browse latest Browse all 58056

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>