SlideView is super slow when adding new elements

4 posts, 0 answers
  1. JM
    JM avatar
    7 posts
    Member since:
    Sep 2017

    Posted 22 Sep Link to this post

    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...

  2. Nikolay Demirev
    Admin
    Nikolay Demirev avatar
    136 posts

    Posted 27 Sep Link to this post

    Hello 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
  3. JM
    JM avatar
    7 posts
    Member since:
    Sep 2017

    Posted 27 Sep in reply to JM Link to this post

    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.

  4. Nikolay Demirev
    Admin
    Nikolay Demirev avatar
    136 posts

    Posted 28 Sep Link to this post

    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
Back to Top