docling-project / docling-project/docling

docling 2.123.0 makes CPU-only PDF conversion ~4x slower (18 s → 80 s on 2 vCPUs); no exposed option restores 2.122.0 speed

Open
#4,174 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
66.4k
Forks
4.8k
Avg merge
2d 21h
Merged PRs (30d)
84

Description

**Summary.** Converting the same 148 KB, text-native 8-K filing through docling-serve takes 18 s with docling 2.122.0 and 80 s with docling 2.123.0, everything else held constant. The regression arrived in our CI on the first night after docling-serve v1.32.0 became `latest` (2026-09-01): the same two-conversion test went from 50–56 s to 189–192 s on a 2-vCPU hosted agent.

**Bisection.** Inside the `quay.io/docling-project/docling-serve:v1.31.0` image (docling 2.121.0, docling-parse 7.15.0, docling-ibm-models 3.14.0, torch 2.13.0, transformers 5.15.1), container limited to `--cpus=2 -m 6g`, warm run discarded:

| change | seconds |
|---|---|
| baseline v1.31.0 | 18.1 |
| + docling-parse 7.16.0 | 18.1 |
| + docling-slim 2.122.0 | 18.1 / 20.1 |
| + docling-slim 2.123.0 | 80.2 / 82.2 |
| + docling-slim 2.124.0 | 74.1 / 78.2 |
| docling-serve v1.32.0 as shipped | 72.2 – 78.3 |

**Options tried on 2.123.0 / v1.32.0**, all via the `/v1/convert/file` multipart API: `pdf_backend=docling_parse` 72–84 s, `pdf_backend=pypdfium2` 80–84 s, `do_ocr=false` 78–82 s, `table_mode=fast` 84–88 s, `DOCLING_PERF_PAGE_BATCH_SIZE=16` 80–84 s, `DOCLING_NUM_THREADS=1 OMP_NUM_THREADS=1` 80 s, threads 2 + batch 8 78 s. The bundled layout model (`docling-layout-heron`), OCR engines and onnxruntime are identical between the two images.

**Expectation.** 2.123.0's release note is "Default to threaded docling-parse across SDK, CLI, service, and extraction" (#3764), measured there at +3 % on GPU. On a CPU-only 2-core host the same release costs 4x, and since selecting `docling_parse` or `pypdfium2` does not recover it, the cost appears to be in the pipeline restructuring rather than the backend choice. Related: #4139 (OCR quality under the new default), #4147 (crashes in parser threads), #3182 (earlier 2x regression from threaded stages).

**Ask.** Is this expected on low-core CPU hosts, and is there a setting that restores the 2.122.0 pipeline path? We have pinned docling-serve v1.31.0 meanwhile. Happy to run further measurements.

Contributor guide

Open the contributing guide

Research direction

Reproduce the reported conversion benchmark on a 2-vCPU host with docling 2.122.0 and 2.123.0, then inspect the threaded docling-parse change described in #3764. Compare the pipeline paths and tested settings; done means identifying the regression or confirming the expected CPU behavior and documenting a setting or validated workaround.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend, performance
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.