> ## Documentation Index
> Fetch the complete documentation index at: https://ziva.zeleza.ru/llms.txt
> Use this file to discover all available pages before exploring further.

# Embedded Systems Optimization

> Optimizing Ziva for embedded and IoT devices

# Embedded Systems Optimization

Ziva automatically detects and optimizes for embedded systems like routers, IoT devices, and resource-constrained environments.

## Automatic Detection

Ziva detects embedded systems by:

* **Memory constraints** - available RAM and swap
* **CPU architecture** - ARM, MIPS detection
* **Environment variables** - BusyBox, OpenWrt markers
* **File system indicators** - `/proc/cpuinfo`, `/etc/openwrt_release`

## Memory Optimizations

```bash theme={null}
# Configure memory thresholds
export ZIVA_MEMORY_PRESSURE_THRESHOLD=50M
export ZIVA_MAX_COMPLETED_TASKS=5
```

## Simplified UI Mode

```go theme={null}
// Embedded-friendly configuration
queue := ziva.NewQueue("IoT Setup")
queue.WithOutSummary().        // disable summary
      WithOutResultLine().         // disable result lines
      WithTasksNumbered(false, ""). // disable numbering
      WithClearScreen(false)       // preserve context
```

## Color Optimization

For limited terminals:

```go theme={null}
// Use simplified colors
queue.WithAppNameColor(ziva.WhiteBright, false).
      WithTitleColor(ziva.GrayBright, false)
```

## Performance Tips

1. **Limit task history** - reduce memory usage
2. **Use shorter timeouts** - faster response
3. **Minimize viewport sizes** - reduce rendering
4. **Disable animations** - improve performance

## Environment Detection

```go theme={null}
// Check if running on embedded system
if ziva.IsEmbeddedSystem() {
    // Apply embedded optimizations
    queue.WithOutSummary()
}
```
