Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Unanswered

Canvas App - Performance of gallery with data loaded through virtual tables in Business Central is slow. What is the best way to go?

(0) ShareShare
ReportReport
Posted on by 25

Hello,

 

We have a build a canvas app, which loads data from Business Central through a virtual table (in Dataverse). We use this code in a gallery:

 

Refresh('Virtualtable');;
Sort(Sort(ClearCollect(
    Department;
    If (
        Afd = "100";
        Filter(
            'Virtualtable';
            No = "100";
            HB < 510;
            BewAppStatus = "Open" || BewAppStatus = "Skipped"
        );
        If (
            Afd = "200";
            Filter(
                'Virtualtable';
                No = "200";
                HB = 200;
                BewAppStatus = "Open"
            );
            If (
                Afd = "210";
                Filter(
                    'Virtualtable';
                    No = "210";
                    HB = 210;
                    BewAppStatus = "Open"
                );
                If (
                    Afd = "300";
                    Filter(
                        'Virtualtable';
                        No = "300";
                        HB = 300;
                        BewAppStatus = "Open"
                    );
                    If (
                        Afd = "310";
                        Filter(
                            'Virtualtable';
                            No = "310";
                            HB = 310;
                            BewAppStatus = "Open"
)))))

 

In the gallery we have filters on the data; see the example above. The number of records that pass the filter are normally below 20, so in the gallery there are sometime 13, 5, 2, 18 records to see, depending on the value of the variable 'Afd'. But loading the gallery takes on a device (tablet) 5-20 seconds. The number of records in the totalset is around 1700. Scrolling can take up to 8 seconds to refresh. What can be the problem here? How can we improve this? All ideas are welcome!!!

 

 

Thank you in advance!

 

 

Categories:
  • BrutusG Profile Picture
    25 on at
    Re: Canvas App - Performance of gallery with data loaded through virtual tables in Business Central is slow. What is the best way to go?

    What I have done so far is

     

    reduce the number of fields in the gallery from 21 to 9 by combining text

     

    there are several lookups in the fields..

     

  • BrutusG Profile Picture
    25 on at
    Re: Canvas App - Performance of gallery with data loaded through virtual tables in Business Central is slow. What is the best way to go?

    Also the number of columns is like 20

  • BrutusG Profile Picture
    25 on at
    Re: Canvas App - Performance of gallery with data loaded through virtual tables in Business Central is slow. What is the best way to go?

    No it has no delegation issues. Maximum of records is 50 that will be retrieved..

     

  • StretchFredrik Profile Picture
    2,628 Super User 2025 Season 1 on at
    Re: Canvas App - Performance of gallery with data loaded through virtual tables in Business Central is slow. What is the best way to go?

    Does your gallery filter query have any delegation issues? That would also explain the poor performance. 

  • BrutusG Profile Picture
    25 on at
    Re: Canvas App - Performance of gallery with data loaded through virtual tables in Business Central is slow. What is the best way to go?

    Thx for your answer. Unfortunately this is not possible in the app. Everytime the user goed to screen, the newest data has to be retrieved, because in the meanwhile the value of a record could have been changed..

  • StretchFredrik Profile Picture
    2,628 Super User 2025 Season 1 on at
    Re: Canvas App - Performance of gallery with data loaded through virtual tables in Business Central is slow. What is the best way to go?

    If load times is an issue u can always get all the data into a collection in the Apps Onstart and then use that within the gallery. That should go faster in my experience.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,524 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,906 Most Valuable Professional

Leaderboard