amazon-chime-sdk-js icon indicating copy to clipboard operation
amazon-chime-sdk-js copied to clipboard

Background blur causes memory leak/long delay in garbage collection in Chrome on Windows

Open justindarc opened this issue 3 years ago • 1 comments

What happened and what did you expect to happen?

Turning on background blur for the local video causes a substantial growth in memory in the Chrome renderer process on Windows that may not recover until the system is under significant memory pressure. You can observe that the memory consumption of the Chrome renderer process in Task Manager will grow several hundred MB (often times exceeding 1 or 2GB) before cleaning up. On machines with a smaller amount of system memory (4GB, 8GB), this can be significant enough to cause the machine to hit 95%+ memory consumption.

Have you reviewed our existing documentation?

Reproduction steps

  1. Join a call in the SDK Meeting Demo in the Chrome browser on Windows (tested with version 100.0.4896.60)
  2. Enable local video
  3. Enable "Background Blur 40% CPU" (also reproduces on other Background Blur settings, but this setting produces most exaggerated results)
  4. Ensure the Chrome browser remains in the foreground
  5. While Chrome is still foregrounded, observe the Google Chrome renderer process memory usage in Task Manager climb steadily by several hundred MB before releasing

Amazon Chime SDK for JavaScript version

2.28.0 . Also reproduces on 3.x meeting demo.

What browsers are you seeing the problem on?

Chrome on Windows

Browser version

100.0.4896.60

Meeting and Attendee ID Information.

No response

Browser console logs

No applicable console logs.

justindarc avatar Apr 04 '22 21:04 justindarc

Synced internally on this. Note that this also occurs on macOS Big Sur 11.6.4 Intel. Initial debugging indicates this is a bug in Chrome where the worker is not releasing memory. I've come up with a temporary hack to alleviate the problem in the worker. I'm currently looking to come up with a smaller reproducible case on fiddle to submit to chromium.

richhx avatar Apr 05 '22 22:04 richhx

Going to resolve this due to release of the V2 pipeline, and age. Not sure how much this was still impacting.

hensmi-amazon avatar Feb 21 '24 19:02 hensmi-amazon