This is a migrated thread and some comments may be shown as answers.

SlideView is super slow when adding new elements

3 Answers 178 Views
SlideView
This is a migrated thread and some comments may be shown as answers.
JM
Top achievements
Rank 1
JM asked on 22 Sep 2017, 02:16 PM

Forms 2.3.4.270 / Xamarin iOS 11.0 / Xamarin.Android 7.4.5.1 

 

RadSlideView is veeery slow when recycling views.

Instead of shifting views and their bounding context left or right, all 3 views binding context are nullify and then reassigned.

Is should be like this:

 

ViewA             ViewB               ViewC
ViewModelA   ViewModelB    ViewModelC
                                *

// <== swipe this way

ViewC             ViewA               ViewB             
ViewModelD   ViewModelA    ViewModelB 
                                *

Then only one view's binding would change

Each time I added an element in the observable collection I had a delay of nearly 1 second...

It's really too bad since the implementation is otherwise quite nice and strong...

3 Answers, 1 is accepted

Sort by
0
Nikolay Demirev
Telerik team
answered on 27 Sep 2017, 08:25 AM
JM,

I have tested the case you are describing. I have attached to BindingContextChanged of the View in the ItemTemplate of the SlideView. Initially, I got 3 changes caused by the initialization of the 3 views which are in the UI. After that on each slide I have one BindingContext changed to null, which is the item which goes out of the collection of 3 Views, then one BindingContext changed to some value, which is for the new item which comes in the collection of 3 UI Views.

Could you send us a sample project where we can reproduce the issue, this way we will be able to investigate and fix it? The forums do not allow attachments, but you could use some cloud storage provider and share a link here.

I am looking forward to your reply.

Regards,
Nikolay Demirev
Progress Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
JM
Top achievements
Rank 1
answered on 27 Sep 2017, 10:41 AM

hello Nikolay !

Sorry I got mixed up...

The recycling issue is not when sliding views but when adding ViewModel in the ObservableCollection.

Each time the collection changes, all the views are recycled (all binding context are nullify, properties are cleaned, you can see it in ContentManagerBase, ResetNativeViews() => RecycleNativeView(nativeView)).

It makes each change to the observable collection very slow.

0
Nikolay Demirev
Telerik team
answered on 28 Sep 2017, 03:33 PM
Hi,

Thank you, now I understand the case. I was able to reproduce it and fix it. The fix will be released with the next minor release and it will be included in the upcoming Service Pack.

As a token of our appreciation for reporting the issue, I am updating your Telerik Points.

Regards,
Nikolay Demirev
Progress Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
SlideView
Asked by
JM
Top achievements
Rank 1
Answers by
Nikolay Demirev
Telerik team
JM
Top achievements
Rank 1
Share this question
or