What is a 
Garbage collection timing
?

Garbage collection (GC) timing refers to the way modern web browsers clean up memory that’s no longer in use by a webpage or application.

Garbage collection timing
 Example

When you use a web application, your browser allocates memory to run it, things like call scripts, UI elements, real-time media processing, etc. Over time, some of this memory becomes unused (for example, if a tab is closed or a call component is no longer active). The browser needs to clear it out to free up resources. That process is called garbage collection.

Garbage collection (GC) timing refers to the way modern web browsers (like Chrome and Firefox) manage memory, specifically, how and when they clean up memory that’s no longer in use by a webpage or application.

An example in the context of browser-based contact centre software like Amazon Connect’s CCP:

When you use a web application, your browser allocates memory to run it, things like call scripts, UI elements, real-time media processing, etc. Over time, some of this memory becomes unused (for example, if a tab is closed or a call component is no longer active). The browser needs to clear it out to free up resources. That process is called garbage collection.

This doesn’t happen constantly, it runs periodically and is often triggered automatically when memory usage hits a certain threshold.

Why Does Timing Matter?

Garbage collection temporarily pauses other browser processes, including those handling:

  • Real-time voice streams (WebRTC)
  • UI responsiveness in the Contact Control Panel
  • Media encryption/decryption
  • Event handling like screen-pop triggers or call timers

These pauses are usually very short (milliseconds), but under heavy load or if memory is poorly managed, they can last longer and cause:

  • Audio stutter or jitter (especially if voice is being processed in-browser)
  • UI lag (e.g. slow call control response)
  • Increased CPU load, especially if garbage collection occurs repeatedly in a tight cycle

In a real-time setting like a hybrid contact centre, where agents are using multiple browser tabs or apps at once, garbage collection can quietly sabotage performance.