RAM consumption of Lists?

Hi, we have in our app an recursive algorithm, which generates the combination of n elements for a user. Currently the microflows adds all possible combinations to a list and commits this list, after the recursion is over. A final uncommitted list contains between 100-400 objects before commit, depends on the number of selected elements of the user. ;-)   This worked fine with a few testusers but with the growing number of users I noticed a high RAM-consumption.   So my question is: How big is the effect of uncommited lists on the RAM? Does is make sense not to commit the list after the loop in those cases, were potentially many users generate the same uncommited list at the same time? Is there a way to find out, which parts of the app consume the most RAM – just like in the Windows task manager? We have APD in place, so this could potentially help.  Thank you!    
1 answers

Hi Tjark,

I can share my experience, lets see if it helps.

- It is not just list, probably the amount of records being processed in memory could also increase the memory consumption. May be try to end your transaction and begin a new one by processing the objects in batches

- I have seen people, developing MF logic with list operations to avoid DB Calls. It is not like DB calls are always bad and List operations are always good. But there should be some balance. (This i am saying with my Java experience)

- If you want to understand how much memory is consumed per MF or per MF action, you can write Java actions which will return the memory consumption. Refer: https://stackoverflow.com/questions/4802651/memory-usage-for-a-specific-list-of-object

- If we have the Java action, then it can be called before and after the activity or at the start and end of the MF to understand the memory consumption. See below