cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Memory footprint increasing

Hi all,

 

I'd like to inform of a situation we've encountered ourselves with while developing a PowerApps application for our company.

Our app connects to around 20 Sharepoint lists as data sources, and is basically a CRUD application for maintenance records. We use 10 collections for processing and paging across the data we gather from Sharepoint, and 15 to cache data from Sharepoint. We have 5 screens in total.

 

When opening our application on Chrome (Version 74.0.3729.169, Official Build, 64-bit), on an Ubuntu, we see memory footprint start around 300 MB, reach 500MB when the app is fully loaded, and then proceed to scale up whenever we change screens or refresh a data source. We've reached 1.5GB, 2GB and so on, with no sign of stopping.

 

Every time we don't need the contents of a collection we Clear them. The collections that serve as cached data are only filled during OnStart and are never altered. We have also enabled the "Delayed Load" and "Control property optimization". We don't know where the need for memory is coming from.

 

If there is a solution available to avoid or mitigate this problem, I'd be glad to hear it.

Edit: Upon investigating the app open in Chrome by watching the memory timeline and snapshoting the JS heap, we've seen that thousands upon thousands of Detached objects are kept by the application, bloating the memory consumption which is always allocating more and more space. See it in the pics attached.

6 REPLIES 6
v-yutliu-msft
Community Support
Community Support

Hi @Anonymous ,

I‘m sorry to hear that.

Our development team is trying their best to improve this app.

If there are any new feather about improving the app permormance, I will reply here.

Here's a doc about some tips to improve app performance for your reference:

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/performance-tips

 

Best regards,

Community Support Team _ Phoebe Liu

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Thank you @v-yutliu-msft for your reply.

 

Could you please tell me then if the cause of the issue would really be the formentioned memory leak, in the form of accumulating detached objects (as seen in the attached files)?

Also, could you clear up whether that's an aspect of PowerApps which will be improved (in which case we'll wait for un update I guess) or a situation we ourselves caused, in which case another approach would avoid the problem?

I brought this up before with a similar graph of memory increasing over time. Never heard anything back on it but it is definitely there - just go back and forth between screens with data, or keep changing a filter affecting what data is pulled through, and it keeps increasing

mogulman
Impactful Individual
Impactful Individual

It is probably an issue with Chrome garbage collection and may not be an issue with your PowerApp.  Since you are on Linux try using Firefox and see if it is the same.  You may be able to use Chrome Dev Tools to gain insight into the problem.

Anonymous
Not applicable

I have used Chrome Dev Tools and noticed that thousands of Detached objects are generated (see the images attached to the original post).

 

Truly, when prompting garbage collector through Dev Tools and comparing snapshots from before and after it, we see that the garbage collector barely deletes any of these Detached. We have also tried on Firefox 67.0 (64 bit) and we observed yet the same behaviour, although we didn't use Dev Tools there. We'll try that next, but the same cause is suspected.

I have used FireFox and Internet Explorer and found it keeps increasing.
I expect it is the app and not the browser

Helpful resources

Announcements
Power Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on August 17, 2022 at 8am PDT.

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Users online (1,812)