DLToolkit.Forms.Controls icon indicating copy to clipboard operation
DLToolkit.Forms.Controls copied to clipboard

Flowlistview a lot of data lag

Open ouyung0215 opened this issue 6 years ago • 2 comments

hi daniel I have a lot of data. in android very lag but ios will not Is it android to deal with anything else?

ouyung0215 avatar Jan 26 '19 07:01 ouyung0215

Sometimes not optimal layout is the causes of lags Show your DataTemplate

vlkam avatar Jan 26 '19 09:01 vlkam

I have too lags, and trying solve this.

<DataTemplate>
<StackLayout BackgroundColor="White" x:Name="lblAlldiscounts" Spacing="0" Margin="5,5,5,5">
                        <Frame CornerRadius="5" 
                       Margin = "0" 
                       Padding = "0" 
                       IsClippedToBounds = "True"
                       HasShadow = "True"
                       BorderColor="White"
                       >
                            <StackLayout Spacing="0">

                                <ffimageloading:CachedImage 
                                HorizontalOptions="FillAndExpand"
                                HeightRequest="170"     
			                    Source = "{Binding discount_item_imageUrl}"
                                Aspect="Fill"

                                FadeAnimationEnabled="False"
                                RetryCount = "2"
                                RetryDelay = "100"
                                CacheDuration="1"
                                LoadingPlaceholder="ic_loading_200.png"
                                DownsampleToViewSize="True"
                                     
                                >
                                    <ffimageloading:CachedImage.CacheKeyFactory>
                                        <local:CustomCacheKeyFactory/>
                                    </ffimageloading:CachedImage.CacheKeyFactory>
                                </ffimageloading:CachedImage>
                                <Label MaxLines="2" Margin="3,0,3,0" HeightRequest="40" Text="{Binding discount_item_title}" TextColor="Black" YAlign="Center" XAlign="Center" HorizontalOptions="CenterAndExpand" VerticalOptions="CenterAndExpand"/>
                                <StackLayout BackgroundColor="White" HorizontalOptions="FillAndExpand" Orientation="Horizontal">

                                    <Label HorizontalOptions="FillAndExpand"/>
                                    <Label HeightRequest="25" Text="{Binding discount_item_newPrice, StringFormat='{}{0:N}€'}" FontAttributes="Bold" FontSize="Medium" TextColor="#d73c62" YAlign="Center" XAlign="Start"/>
                                    <Grid VerticalOptions="FillAndExpand">
                                        <Label HeightRequest="25" Text="{Binding discount_item_oldPrice, StringFormat='{}{0:N}€'}" TextColor="Black" YAlign="Center" XAlign="End"/>
                                        <BoxView HeightRequest="3"
                                            VerticalOptions="Center"
                                            Opacity="0.5"
                                            Color="Black" 
                                             />
                                    </Grid>
                                    <Label HorizontalOptions="FillAndExpand"/>
                                </StackLayout>
                                <Label HeightRequest="25" x:Name="lblTime" Text="{Binding CountDown}" BackgroundColor="White" TextColor="#EF19A8" YAlign="Center" XAlign="Center" HorizontalOptions="FillAndExpand"/>
                            </StackLayout>
                        </Frame>
                    </StackLayout>
                </DataTemplate>

And most lagging place between items where red line: image

naxbcr avatar Mar 05 '19 14:03 naxbcr