# Indexer Performance

> Indexer Performance is an Agent Skill for testing & quality published in the enviodev/hyperindex repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.

Use when optimizing indexer speed or tuning sync performance. HyperSync, batch size, WebSocket realtime config, and preload optimization.

- Skill name: `indexer-performance`
- Category: [Testing & Quality](https://www.openparable.com/skill/testing-quality/1)
- Source: https://github.com/enviodev/hyperindex/blob/HEAD/packages/cli/templates/static/shared/.claude/skills/indexer-performance/SKILL.md
- Repository: enviodev/hyperindex (536 GitHub stars when collected)

## SKILL.md

# Performance Tuning

## HyperSync (Default — Fastest)

HyperSync is the default data source for supported chains. Up to 1000x faster than RPC. No configuration needed — automatic for supported networks.

## Batch Size

```yaml
full_batch_size: 5000  # Target events per batch (default: 5000)
```

Reduce if handlers make many slow Effect API calls that can't be batched.

## WebSocket for Realtime Indexing

Add `ws:` for lower-latency new block detection via `eth_subscribe("newHeads")`:

```yaml
rpc:
  - url: ${ENVIO_RPC_ENDPOINT}
    ws: ${ENVIO_WS_ENDPOINT}
    for: realtime
```

## Database Indexes

Add `@index` to schema fields for faster queries — see `indexer-schema` for full syntax (single-field, composite, DESC direction).

> If something is unclear, use the `envio-docs` skill to search and read the latest documentation.

---

Source: https://www.openparable.com/skill/testing-quality/indexer-performance (OpenParable). Cite the canonical URL above.
