Hi everyone,
I'm developing an application which is currently being tested in different places. However on places with very slow connections the application takes a long time to start.
The app works with a lot of blob images that load into a collection on the start of the application. I guess performance wise this is not very good. In the application you're able to retrieve blob images from a database as well patch images into the database.
Once the collection is loaded, I think from there on the perfomance is pretty solid, but at start it could take ages. Way too long to be somewhat user friendly. Is there a practice for storing and showing images to improve performance? Maybe divide collections per screen to split up the loading time?
Many thanks!
Ski
Solved! Go to Solution.
Hi @SkiDK
You can use se the Concurrent function to load data sources simultaneously, collect the images in more than one collection to test.
More information:
https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/performance-tips
https://powerapps.microsoft.com/en-us/blog/performance-considerations-with-powerapps/
Best Regards.
Yumia
@v-yuxima-msft I made a test and got it settled out.
Collections do only get created when it is told to. Doing the next on an OnVisible property of the new section screen got me to load only the images connected to that section
Collect( ColMedia, Filter("datasourceMedia", SectionId = varSectionId )
Then on a gallery:
Filter(colMedia, SectionId = varSectionId)
This really increased the loading time of the application. I didn't do it through a Concurrent, but I did split up the collection. Using Collect instead of ClearCollect, I also add the new media instead of refreshing, thus meaning when I go back to another section, tghe media does not have to be reloaded.
Hi @SkiDK
You can use se the Concurrent function to load data sources simultaneously, collect the images in more than one collection to test.
More information:
https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/performance-tips
https://powerapps.microsoft.com/en-us/blog/performance-considerations-with-powerapps/
Best Regards.
Yumia
Hi @v-yuxima-msft, thanks for your reply
Do all collections get loaded when the app gets initialized wherever they are? If I have a ClearCollect in the OnVisible property of another screen, would it load in the beginning of the app or only when the screen gets visible?
I was thinking creating a new collection for every section once you enter its screen. Doing this by naming a new collection for example:
ClearCollect( "ColMedia" & varSectionId, Filter("datasourceMedia", SectionId = varSectionId ))
Is this a good idea? And does it work when I put it on an OnVisible property of a screen? Or does it all get loaded in the beginning anyway? In that case splitting the collection in OnStart on Concurrent might be the better case, but would it actually be that faster in places with a slow connection, since still all media needs to be downloaded?
Thanks
@v-yuxima-msft I made a test and got it settled out.
Collections do only get created when it is told to. Doing the next on an OnVisible property of the new section screen got me to load only the images connected to that section
Collect( ColMedia, Filter("datasourceMedia", SectionId = varSectionId )
Then on a gallery:
Filter(colMedia, SectionId = varSectionId)
This really increased the loading time of the application. I didn't do it through a Concurrent, but I did split up the collection. Using Collect instead of ClearCollect, I also add the new media instead of refreshing, thus meaning when I go back to another section, tghe media does not have to be reloaded.