docling-project / docling-project/docling
2x pipeline regression in 2.81.0 vs 2.74.0 (threaded stages, not enrichment)
- Dominant language
- Python
- Stars
- 66.4k
- Forks
- 4.8k
- Avg merge
- 2d 21h
- Merged PRs (30d)
- 84
Description
### Bug
Upgrading from Docling 2.74.0 to 2.81.0 doubles total conversion time on a 739-page PDF benchmark. The regression is in the threaded pipeline stages (preprocess → OCR → layout → table → assemble), not in enrichment.
## Benchmark
739-page PDF , all enrichment enabled, dual vLLM API servers for picture description + code/formula, RTX 5090 (32 GB), Flash Attention 2 enabled.
| Phase | 2.74.0 | 2.81.0 |
|---|---|---|
| Threaded pipeline (OCR, layout, table, assemble) | ~215s | ~420s |
| Code/formula enrichment (API, batch=10, C=12) | ~59s | ~60s |
| **Total** | **274s** | **517s** |
Output quality is identical: 7024 segments, 179 code, 165 formula, 96.6% exact text match (differences are table column alignment only).
### Steps to reproduce
```bash
docforge convert-parquet \
--vlm-engine api \
--vlm-api-url http://localhost:8000/v1/chat/completions \
--code-formula-api-url http://localhost:8001/v1/chat/completions \
--code-formula-api-concurrency 12 \
--code-formula-batch-size 10 \
--flash-attention \
--force \
"large-document.pdf"
```
The slowdown is not specific to our wrapper — it's in the `StandardPdfPipeline` threaded stages. The enrichment phase (which bypasses the pipeline via API) runs at the same speed.
we have ruled out logging overhead as a possible issue(124 loglines, 739 page doc).
## Environment
```
Python 3.12.3
docling 2.81.0 (regression), docling 2.74.0 (baseline)
docling-core 2.70.2
docling-ibm-models 3.12.0
torch 2.10.0+cu128
flash-attn 2.8.3+cu128torch2.10
CUDA 12.8
NVIDIA GeForce RTX 5090 (32 GB)
```
## Notes
Upgraded to 2.81.0 to pick up the `torch_dtype` fix for CodeFormulaV2 ([#3026](https://github.com/docling-project/docling/issues/3026) / PR #3117) and the `PdfHyperlink.uri` fix. Both work correctly. The regression is unrelated to those fixes.
Contributor guide
Assessment
This issue has not been assessed yet.