17. Memory Monitoring and Management
While running, Lantide Data keeps query results, cached tables, and engine data in memory. To avoid performance issues from low memory, the app provides live monitoring, pressure warnings, and one-click cleanup.
17.1 Title Bar Memory Indicator
The top-right of the title bar has a memory usage icon (MemoryStick; hover shows "Memory usage") that reflects the current memory pressure level in real time:
| State | Icon | Description |
|---|---|---|
| Normal | Default color | Memory usage below 70% |
| Warning | Yellow | Usage at 70%–90%; consider clearing cache |
| Critical | Red + pulse animation | Usage above 90%; clear immediately |
Click the icon to open the Memory Dashboard dialog.
17.2 Memory Pressure Toast Notifications
When memory pressure crosses a threshold, a Toast appears automatically:
- Memory Warning — usage reaches about 70%; consider clearing unneeded cache.
- Memory Critical — usage exceeds about 90%; free space via the Memory Dashboard immediately.
17.3 Memory Dashboard
In the Memory Dashboard you can view and manage all memory-related settings:
Overall usage
- The top shows Overall: X / Y MB (Z%) with a color progress bar for an intuitive view of the usage ratio.
Memory budget settings
| Setting | Description |
|---|---|
| Maximum Memory Budget | A dropdown to adjust the memory cap (256 MB to about 80% of system RAM). The option marked (recommended) is the suggested value (about 25% of system RAM, up to 4096 MB). Takes effect immediately |
| Max In-Memory Results | A dropdown to set how many query results are kept in memory (1–20). Results beyond this count spill to disk automatically. Takes effect immediately |
Module memory breakdown
The Dashboard splits memory into four modules, each showing estimated usage (MB) and share (%):
| Module | Description | Available actions |
|---|---|---|
| DuckDB Engine | Memory used by the query engine | — |
| Query Result Cache | Query result cache (including the in-memory count and the spilled count) | Spill to Disk |
| Tab Cache | Tab cache tables | Drop All |
| Python Overhead | Python runtime overhead | Force GC |
Cached table list
Below the module cards you can see the name, row count, and estimated size of every cached table. Each cache has a delete button so you can remove unneeded cached tables one by one.
Disk Spill
Shows the amount of data spilled to disk and the temp directory path.
Emergency Clean
Click the Emergency Clean button and the system runs all cleanup actions at once: spill query results to disk, release all tab cache, and run Python garbage collection. When done, a Toast shows the amount of memory freed.
Tip: While the Memory Dashboard is open, usage data refreshes automatically every 2 seconds; after it closes, every 5 seconds. When the browser tab is not visible, polling pauses automatically to save resources.