Memory and CPU Usage Debugging Viewer

I’ve been having a bit of troubles lately trying to figure out where the ram usage is coming from…

I have a web app that displays quiet a few WebSDKUIControls. Currently each session is around 1.5gig of RAM. Which is weird in of itself as the total size off all the pictures is a few MB.

RAM used is SessionCount*1.5GB

Using the Runtime iterator and looping through all the current objects doesn’t give much information in what the size of the object is or where in the program it is located but has identified which type of objects (seems to be all the WebSDKUIControls I have made).

I think adding in a visual RAM and CPU usage when debugging would be super useful. Being able to see what objects are using the RAM/CPU, where in the app they are located and what session they’re in (if a web app) would make it was easier to find issues. Also, will probably help with circular referencing as you’ll be able to see what objects are alive and where they are (currently having issues with this as there is no clean up after the session closes).

Once the session is closed it takes about 3mins to be tided by garbage collection. Is there a way to force this sooner?. Currently if the user hits the refresh button a few times it spikes the RAM usage and was crashing the 32bit version after only a couple of refreshes. The sessions don’t get reused from what I have seen so a quicker clean up would be handy.

What objects can keep a session from closing? I know about keeping a session or webpage as a property can and changing them to WeakRefs will solve this. Can a webfile?