Inspect your app with the Memory Monitor in VS Code
-
Open the command palette in VS Code.
Mac:
Shift+Command ⌘+PLinux:Ctrl+Shift+P
-
Enter Vega: Start Memory Monitor and press return for Mac, or Enter for Linux.
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.
-
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.
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)
Inspect your app using CLI
Use the Vega Studio app performance CLI command,vega exec perf memory-monitor.
Memory components
The following table describes the memory sub-components forPSS, 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.- In Memory Monitor, select ⏺️ Start Recording.
- Enter a name for your recording session when prompted.
- Enter the recording timeout when prompted. By default, the recording timeout is 120 seconds.
- On your Fire TV Stick, run your app in “release” mode.
- 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
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:-
Find the memory monitor recording file (example:
Basic-memory-recorder[timestamp].json) using VS Code Quick Open or in the project’sgenerateddirectory. - Click the file once to preview or twice to open in active mode.
- Open VS Code.
-
Open the command palette:
- Mac:
Cmd+Shift+P - Linux:
Ctrl+Shift+P
- Mac:
- Run “Shell Command: Install code command in PATH”.
-
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.- Open VS Code.
-
Open the command palette:
- Mac:
Cmd+Shift+P - Linux:
Ctrl+Shift+P
- Mac:
- Enter Vega: Open Recording View.
- 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.
Related topics
- App Performance Best Practices
- Measure App KPIs
- Identify UI Rendering Issues
- Detect Overdraw
- Investigate Component Re-rendering Issues

