cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Ancy
Kudo Kingpin
Kudo Kingpin

Lookup method taking more time to Load data on Gallery in Canvas App

Hi All,

 

We need help to improve performance of Canvas App.

 

We are using the SQL Server Connector and wanted to load data into gallery from related table. We have reference of related table (foreign key), and using the Lookup method to get related table fields by record by id.

 

That is taking more time than usual to load data. Is there any way to load data faster?

 

Also, we have used the Combo-box on the Form and used the Lookup method to populate default value. This is also taking more time.

 

Any help will be appreciated.

 

Thank you

1 ACCEPTED SOLUTION

Accepted Solutions
timl
Super User
Super User

Hi @Ancy 

To increase performance, I would highly recommend that you create a SQL Server View that joins your primary and related tables. You would then set the Items property of your gallery to this view.

When you add a combobox to a gallery, the app will call LookUp (and make a call to SQL Server) for each row in the gallery. This is the main reason for the slow performance. When you set the Items property of a gallery to a view, the app can make just a single call to SQL Server.

In terms of increasing the performance of LookUp on the form, I would check that the fields from the table that you lookup are properly indexed. That will also help performance.

View solution in original post

2 REPLIES 2
Nogueira1306
Community Champion
Community Champion

A Lookup always takes its time because he needs time to find the line... The biggest the table is, the longest it takes.

What you can do is load the data on App OnStart, a simply "Refresh" must do it or you can even laod the data in a collectino and after that you use that collection.

 

If you need additional help please tag me in your reply and please like my reply.
If my reply provided you with a solution, pleased mark it as a solution ✔️!

Best regards,
Gonçalo Nogueira

Check my LinkedIn!

Check my User Group (pt-PT)!

Last Post on Community

timl
Super User
Super User

Hi @Ancy 

To increase performance, I would highly recommend that you create a SQL Server View that joins your primary and related tables. You would then set the Items property of your gallery to this view.

When you add a combobox to a gallery, the app will call LookUp (and make a call to SQL Server) for each row in the gallery. This is the main reason for the slow performance. When you set the Items property of a gallery to a view, the app can make just a single call to SQL Server.

In terms of increasing the performance of LookUp on the form, I would check that the fields from the table that you lookup are properly indexed. That will also help performance.

View solution in original post

Helpful resources

Announcements
2022 Release Wave 1 760x460.png

2022 Release Wave 1 Plan

Power Platform release plan for the 2022 release wave 1 describes all new features releasing from April 2022 through September 2022.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Top Solution Authors
Top Kudoed Authors
Users online (2,524)