Lag before navigating to a page with a ListView

I’m using Shell with a Flyout menu.
When I’m tapping on one of the menu items to navigate to a page with a ListView then, the Flyout doesn’t close immediately.
There is a lag of a few milliseconds, but noticeable and then, the app goes to the page with the ListView with the activity indicator.
I don’t think that this is related to the Shell since before introducing Shell, I had a button to navigate to the page and the behavior was almost the same.
Does anyone experience the same issue?
Anyone knows how to solve it?

Answers

  • LandLuLandLu Member, Xamarin Team Xamurai

    Have you tried it on another physical device or other emulators?
    If it always occurred when you want to navigate to a new page I think it's the issue of your particular device's performance.

  • DimitrisMylonasDimitrisMylonas USMember ✭✭

    I don't use emulators. I always use a physical device. I tested in 2 devices (Android) and in both devices the behavior is the same.
    Nokia Android one 3.1 and a Samsung J3

  • LandLuLandLu Member, Xamarin Team Xamurai

    It could be device-related as they didn't happen on my Pixel and emulators.
    If you want to help us improve this performance you can raise an issue under github:
    https://github.com/xamarin/Xamarin.Forms/issues
    If you want to seek one-on-one help please contact us through:
    https://support.microsoft.com/en-us/supportforbusiness/productselection?sapId=211dd84f-3474-c3c5-79bf-66db630c92a6

  • DimitrisMylonasDimitrisMylonas USMember ✭✭

    Thanks a lot for the guidance. I will try to create a simple project that will show the behavior so we can identify if it's a device issue or not.

  • DimitrisMylonasDimitrisMylonas USMember ✭✭

    I created a new project in VS just by choosing the Shell template. I converted the AppShell to have flyout menus instead of tabs.
    In the attached screencast, when I tapped on the item that is currently displayed (the first tap is on the about page) then the side menu closes very smoothly which is the expected behavior.
    When I tap on the second item (which is not displayed) then there is lag before the side menu closes. It seems as if the app is frozen for a few milliseconds.
    Even on the 4th tap which is going back to the about page which doesn't get any data the time lag is visible and noticeable.
    I was expecting the closing of the side menu, in all cases, to be smooth as it is on the 1st tap (which doesn't navigate to another page)

  • LandLuLandLu Member, Xamarin Team Xamurai

    If your issue occurred at pushing time it could your device's performance.
    However, if you are talking about Shell. You could refer to the sample of master detail page:

    if (newPage != null && Detail != newPage)
    {
        Detail = newPage;
    
        if (Device.RuntimePlatform == Device.Android)
            await Task.Delay(100);
    
        IsPresented = false;
    }
    

    It will run some delay before pushing. I think Shell maybe has this delay too.
    So if you want to help us improve this feature try to raise an issue on github as I mentioned above.

  • DimitrisMylonasDimitrisMylonas USMember ✭✭

    I already raised an issue on GitHub.

  • LandLuLandLu Member, Xamarin Team Xamurai

    You could post the link here so that we can help you track the process.

  • DimitrisMylonasDimitrisMylonas USMember ✭✭

    The following is the link of the issue that I raised.
    https://github.com/xamarin/Xamarin.Forms/issues/7521

  • DimitrisMylonasDimitrisMylonas USMember ✭✭

    @LandLu I raised an issue since September 14th but nothing happened so far! The problem still exists and seems that other people have the same issue!

Sign In or Register to comment.