API ReferenceGE Extensionseditorflowgraph
Flowgraph Garbage Debug
Flowgraph window for analyzing per-node and per-graph memory allocation (garbage generation) with expandable statistics and plots.
Flowgraph window for analyzing per-node and per-graph memory allocation (garbage generation) with expandable statistics and plots.
Overview
fg_garbageDebug visualizes garbage collection data collected during flowgraph execution. It computes statistics (total allocation, average per frame, quantiles, active frame count) for each graph and node, then displays sorted lists with expandable allocation plots. Useful for identifying memory-heavy nodes that cause GC pressure.
Class Fields
| Field | Type | Description |
|---|---|---|
C.windowName | string | 'fg_garbage' |
C.windowDescription | string | 'Garbage Debug' |
Class Methods
| Method | Description |
|---|---|
C:init() | Registers window, builds color-per-magnitude palette |
C:attach(mgr) | Binds to a flowgraph manager |
C:draw() | Main draw: enable toggle, sort combo, stats display |
C:computeAllStats() | Compute stats for all graphs/nodes, sort by selected key |
C:computeStats(entry) | Calculate avg, quantiles, active count for one entry |
C:setSortingValue(entry) | Set value and valueMagnitude for sorting/coloring |
C:drawStats(label, entry) | Draw one expandable stats row with optional plots |
C:handleMeta(e) | Jump-to-node/graph button for entries |
Sort Keys
| Key | Description |
|---|---|
total | Total allocation over all frames |
averageChange | Average allocation per active frame |
maxChange | Highest single allocation |
q25 / q50 / q75 / q90 | Quantile allocations |
activeCount | Number of frames with allocation |
Usage Example
-- Enable garbage debugging in preferences
editor.setPreference("flowgraph.debug.debugGarbage", true)
-- Run the flowgraph, then open the Garbage Debug window
-- Data is stored in mgr.garbageData after execution
-- Statistics are computed on first render after runningSee Also
- Flowgraph Base Window - Related reference
- Flowgraph Events - Related reference
- Flowgraph Examples - Related reference
- World Editor Guide - Guide