googleinterns/guide-doge

Fix memory leaks (if any)

Closed this issue · 1 comments

Fix memory leaks (if any)

Below is the memory allocation timeline for over 5 minutes. Intense UI interactions have been made during the first 30 seconds to have better code coverage, and no UI interactions are made after.

(Click to enlarge the images)
Screen Shot 2020-07-13 at 5 02 38 PM

Over the rest 4.5 minutes of no UI interactions, 20,461,288 B - 19,966,056 B = 495,232 B = 0.47 MB of increase in memory allocation has been observed, which is 2.48% increase since the first 30 seconds. Towards the end of 5 minutes, the memory allocation seems to be more steady.

Screen Shot 2020-07-13 at 5 25 42 PM

Zooming into each of subtle increases (~75 KB and decreasing as time goes), it can be observed that they are caused by Angular's periodic change detection. Since the only user-written methods (humanizeMeasureName and get options) in the stack trace seem to be correctly GC'ed, I would assume there is no memory leak on our end.