Amazon Developer

as

Settings
Sign out
Notifications
Alexa
Amazon Appstore
Ring
AWS
Documentation
Support
Contact Us
My Cases
Get Started
Design and Develop
Publish
Reference
Support
Skip to main content
Memory Monitor, a tool within Vega Studio, provides visibility into your app’s memory usage through a graphical interface. It helps you identify and resolve memory issues before they cause performance problems: crashes, freezes, or jittering. With Memory Monitor, you can capture a snapshot of your app’s memory state, and then analyze it in a recording view. The recording view highlights high memory consumption areas, enabling performance optimization by addressing inefficiencies. This page explains how to use Memory Monitor, record app memory breakdown, and analyze recorded data using the Visual Studio (VS) Code command palette.

Inspect your app with the Memory Monitor in VS Code

  1. Open the command palette in VS Code. Mac: Shift+Command ⌘+P Linux: Ctrl+Shift+P Screenshot that shows the Start Memory Monitor option in the command palette.
  2. Enter Vega: Start Memory Monitor and press return for Mac, or Enter for Linux. Screenshot that shows the Select Memory Monitor option from the App Performance Tools menu. You can also select the Memory Monitor from the App Performance Tools section. Your screen displays the Memory Monitor view. If you see a blank screen, close the window and restart the Memory Monitor.
  3. Launch your app on the connected device and start Memory Monitor. You see a progress bar opens in a new window then the live rendering of the Memory Monitor chart starts. Screenshot that shows the live rendering of Memory Monitor. The view shows the following memory breakdowns:
    • Proportional Set Size (PSS)
    • Unique Set Size (USS)
    • JavaScript (JS) Heap (only for React Native for Vega apps)
    PSS indicates overall memory use, while USS shows private memory use. Increasing USS over time may signal a memory leak.

Inspect your app using CLI

Use the Vega Studio app performance CLI command, vega exec perf memory-monitor.
See Vega Studio App Performance CLI for other command options.

Memory components

The following table describes the memory sub-components for PSS, USS, System Available Memory, and JS Heap.

Record your app memory breakdown

You can capture data for a specific period of time you want to analyze.
  1. In Memory Monitor, select ⏺️ Start Recording.
  2. Enter a name for your recording session when prompted.
  3. Enter the recording timeout when prompted. By default, the recording timeout is 120 seconds.
  4. On your Fire TV Stick, run your app in “release” mode.
  5. To end the session, select ⏹️ Stop Recording. The Recording View opens in a separate window.

Analyze your recorded data

The recording view helps you analyze your recorded performance data in detail. When you open the view, it shows multiple breakdowns and visualizations:
  • Timeline
  • PSS
  • USS
  • Traces
  • JS Heap
  • GC summary
Screenshot that shows the Memory Breakdown Record View that helps you analyze your recorded data. You must monitor GC activity closely for the following reasons:
  • Frequent GC runs show your app dedicates excessive time to memory management instead of focusing on core tasks. This excessive memory management impacts your app’s performance, making it run slower and respond less quickly to user interactions.
  • During Stop-the-World (STW) events, the GC temporarily freezes your app to free up memory. The pauses interrupts app responsiveness because the app stops processing user input during GC.

Open a previous recording

You can use one of the following options to open a previous recording: Quick open or the VS Code command palette.

Option 1 (Preferred): Use Quick open

This method provides access to your recordings through VS Code’s interface or CLI.

From VS Code

  1. Find the memory monitor recording file (example: Basic-memory-recorder[timestamp].json) using VS Code Quick Open or in the project’s generated directory.
  2. Click the file once to preview or twice to open in active mode.

From CLI

Open a terminal window and enter:
If your terminal doesn’t recognize the code command:
  1. Open VS Code.
  2. Open the command palette:
    • Mac: Cmd+Shift+P
    • Linux: Ctrl+Shift+P
  3. Run “Shell Command: Install code command in PATH”.
  4. Retry the command.

Option 2: Use VS Code command palette

This method provides access to your recording using VS Code’s built-in command interface or if Quick Open isn’t available.
  1. Open VS Code.
  2. Open the command palette:
    • Mac: Cmd+Shift+P
    • Linux: Ctrl+Shift+P
  3. Enter Vega: Open Recording View.
  4. From the list, choose a previous recording session. The session’s Recording View opens in a new window. If you have a current session in another tab, the focus is on the new session.

Last modified on December 22, 2025