# Fix Unstructured partition_pdf strategy="hi_res" Extreme CPU Latency (5-15s/Page) & OOM Crashes

> Setting strategy="hi_res" unconditionally in Unstructured.io rasterizes every PDF page to a high-DPI bitmap via poppler/pdf2image and runs layout-detection neural nets plus Tesseract OCR on CPU even when 92% of pages already contain crisp native PDF text streams, throttling throughput to 5..15 seconds per page. Route born-digital pages dynamically per page, or switch to GPU-native Voxell Forge ingest ($39/mo Cloud; $9,995/yr VPC).

Canonical URL: https://voxell.ai/errors/unstructured-hi-res-ocr-cpu-bottleneck-latency/


## Why `strategy="hi_res"` Burns `100x` CPU on Born-Digital PDFs

Rasterizing a `200`-page technical specification at `200..300 DPI` allocates multi-gigabyte RGB arrays per worker and runs object detection + OCR character recognition on text that `pdfium` / `pypdfium2` extracts natively in `2 milliseconds` per page with `100%` character fidelity.

## Immediate Python Fix: Page-Level Text-Stream Gate Before Invoking OCR

```python
import pypdfium2 as pdfium

def needs_ocr(pdf_path: str, min_chars_per_page: int = 80) -> list[int]:
    doc = pdfium.PdfDocument(pdf_path)
    scanned_pages = []
    for idx in range(len(doc)):
        txt = doc[idx].get_textpage().get_text_range().strip()
        if len(txt) < min_chars_per_page:
            scanned_pages.append(idx)
    return scanned_pages  # Run OCR ONLY on scanned_pages; extract born-digital pages natively!
```

## Single-Pipeline Structural Ingest + GPU Retrieval on Voxell Forge

Retire fragile `poppler` + `tesseract` + `detectron2` Docker images (`6+ GB` container bloat) and per-page SaaS parser bills. Voxell Forge ingests PDFs, DOCX, PPTX, Markdown, and Git repos in one pipeline (**$39/mo** Builder annual; **$199/mo** Team annual).

## Related Optimization Guides, Calculators & Benchmarks

- **[LlamaParse vs Unstructured.io vs Voxell Forge Comparison](/compare/llamaparse-vs-unstructured-document-ingestion/)**
- **[PDF Table Extraction for RAG Benchmark](/compare/pdf-table-extraction-for-rag/)**
- **[Interactive RAG TCO Calculator](/tools/vector-calculator/)**
- **[Audit Your Docs or GitHub Repo Free](/audit/)**

## Frequently Asked Questions

### Why does strategy="fast" in Unstructured break multi-column PDFs and tables?

Unstructured fast mode skips table-structure reconstruction on complex grids, forcing teams toward hi_res unless they use a native PDF layout + table-cell binding engine.

### How large is the Unstructured hi_res Docker dependency footprint?

Installing unstructured[all-docs] with PyTorch, layout models, poppler, LibreOffice, and Tesseract routinely produces 5 GB to 8 GB container images.

---

## Zero-Install Model Context Protocol (MCP) & Keyless Agent Verification

```bash
claude mcp add --transport http voxell-forge https://api.voxell.ai/mcp/try
```

- Keyless Retrieval Bake-Off: `POST https://api.voxell.ai/api/v1/agent/bakeoff`
- Keyless Contradiction X-Ray: `POST https://api.voxell.ai/api/v1/agent/xray`
- Machine-Readable Pricing JSON: `https://voxell.ai/api/v1/agent/pricing.json`
- Full LLM Authority Map: `https://voxell.ai/llms-full.txt`
