I've come up with some great performance tweaks for listview (my previous performance improvements were for xlabs collectionview).
I now have 100% native performance, even with view cells defined in xaml as such.
<?xml version="1.0" encoding="UTF-8"?>
<local:FastCell xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="TwinEvents.Core.Media.View.MediaCellXaml"
xmlns:local="clr-namespace:TwinEvents.Core.Media.View;assembly=TwinEvents"
>
<AbsoluteLayout BackgroundColor="Black">
<local:FastImage x:Name="ImageView" AbsoluteLayout.LayoutFlags="None" AbsoluteLayout.LayoutBounds="0,0,320,260"/>
<local:FastImage x:Name="UserThumbnailView" AbsoluteLayout.LayoutFlags="None" AbsoluteLayout.LayoutBounds="5,240,40,40"/>
<Label x:Name="NameLabel" Text="some text" TextColor="White" AbsoluteLayout.LayoutFlags="None" AbsoluteLayout.LayoutBounds="50,250,100,20"/>
<Label x:Name="DescriptionLabel" Text="some text" TextColor="White" AbsoluteLayout.LayoutFlags="None" AbsoluteLayout.LayoutBounds="50,270,100,40"/>
</AbsoluteLayout>
</local:FastCell>
The images are all loaded from the interwebs.
and bare in mind that the images in this list are not even thumbnail sized, they are all like 2448 x 3264 photos..
The implementation is pretty straight forward but took a bit of hacking to get to, and is iOS only for now. The image optimizaitons use SDWebImage (as one might imagine). I hope someone here will take up the baton and implement the renderers on android too.
These are things which the Xamarin guys should be picking up imo. They're not doing themselves any favours by letting a bunch of whiney little bitches moan about how bad performance in the lists are. Fortunately, there are enough of us who see the greatness of this platform to put in the effort to not just raise issues; but try and help each other out with workarounds too. This is my little contribution to that cause. I'm sure there's issues with it; but hopefully the approach will be viable (I have no issues with it thusfar) - and if not improved upon.
https://gist.github.com/georgejecook/2e69d336350528494b00
note - that the fastImageCell renderer adheres to an interface.. I like the idea of exposing a native interface from the renderer, which can be used by the xamarin view - as that could cut out the binding code and overhead - though I've not actually found much cost in it.. so I'm still umming and ahhing about the approach.