I am working on a canvas app which displays about a dozen fields from a SharePoint list of over 750 items (it will not exceed 1000). The list contains over 50 fields and the app takes about a minute to load the data, so I am looking for a more efficient means to read the list into a collection. It occured to me that maybe by limiting the fields to read, performance might improve. Is this a valid assumption?
If the assumption is true, I was hoping ClearCollect(Showcolumns(datasource, field1, field2)) would work but it appears ShowColumns works on tables but not data sources. I'm now considering loading a data table which does allow me to limit the columns.
Does anyone have suggestions how to best limit the data read? should I be looking for other means to improve performance?
Solved! Go to Solution.
That load time seems odd for just loading in a collection, there maybe other reasons for you're slowness? Eg, if you have screens that reference other screens and these other screens have many controls then all related screens must load onstart. Thi said can slow load time and there are other things that can slow your app down as well.
ShowColumns definitely works on datasources like SharePoint because I've used it in the past. Your formula should be more like
ClearCollect( yourCollection, ShowColumns(yourDataSource, Filed1, Field2))
There are blog articles on the web explaining how to reduce app slowness which are worth reading if it continues to be an issue.
You are right. Limiting the columns with ShowColumns will improve the performance when we wrap this function while retrieving the data.
If you are displaying data in a gallery, then you can wrap ShowColumns function around your data source.
Example:
ShowColumns(<Your SharePoint List>,"ID","Title") - Note column names are within double quotes. You can see them in the intelligence.
Regards
Krishna Rachakonda
If this reply helped you to solve the issue, please mark the post as Accepted Solution. Marking this post as Accepted Solution, will help many other users to use this post to solve same or similar issue without re-posting the issue in the group. Saves a lot of time for everyone. |
That load time seems odd for just loading in a collection, there maybe other reasons for you're slowness? Eg, if you have screens that reference other screens and these other screens have many controls then all related screens must load onstart. Thi said can slow load time and there are other things that can slow your app down as well.
ShowColumns definitely works on datasources like SharePoint because I've used it in the past. Your formula should be more like
ClearCollect( yourCollection, ShowColumns(yourDataSource, Filed1, Field2))
There are blog articles on the web explaining how to reduce app slowness which are worth reading if it continues to be an issue.
You are right. Limiting the columns with ShowColumns will improve the performance when we wrap this function while retrieving the data.
If you are displaying data in a gallery, then you can wrap ShowColumns function around your data source.
Example:
ShowColumns(<Your SharePoint List>,"ID","Title") - Note column names are within double quotes. You can see them in the intelligence.
Regards
Krishna Rachakonda
If this reply helped you to solve the issue, please mark the post as Accepted Solution. Marking this post as Accepted Solution, will help many other users to use this post to solve same or similar issue without re-posting the issue in the group. Saves a lot of time for everyone. |
Thank you for confirming my assumptions. From your replies, I created a blank canvas app, and used a button to perform the ClearCollect function. The results of this test work as you stated. I am now looking into the field names call in my original app as i now suspect I am missing some fields or they are misspelled. There are a couple of managed metadata fields, which also be having an impact on the functions.
Thank you
User | Count |
---|---|
198 | |
105 | |
88 | |
45 | |
43 |
User | Count |
---|---|
245 | |
105 | |
103 | |
65 | |
60 |