Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ jobs:
python-version: ['3.10', '3.11', '3.12', '3.13', '3.14', '3.15']
steps:
- uses: actions/checkout@v7
- name: Check performance documentation budgets and links
run: python3 scripts/tools/update_performance_docs.py --check
- name: Install system fonts
# The renderer substitutes a SYSTEM face for every font a PDF names but
# does not embed, and the ubuntu-24.04 image ships essentially none
Expand Down
6 changes: 4 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,10 @@ scratch*
docs/performance_benchmarks/*.csv

# Published benchmark figures and compact provenance.
!docs/performance_benchmarks/2026-11-bo767-m3-max/*.png
!docs/performance_benchmarks/2026-11-bo767-m3-max/provenance.json
!docs/performance_benchmarks/*/*/assets/*.png
!docs/performance_benchmarks/*/*/provenance.json
!docs/performance_benchmarks/*/*/publication.json
!scripts/tools/update_performance_docs_artifacts/performance_docs_limits.json

# Created by https://www.toptal.com/developers/gitignore/api/python,macos,emacs,cmake,virtualenv
# Edit at https://www.toptal.com/developers/gitignore?templates=python,macos,emacs,cmake,virtualenv
Expand Down
4,778 changes: 4,778 additions & 0 deletions .plans/active/reduce-memory-footprint.md

Large diffs are not rendered by default.

29 changes: 29 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,35 @@ if(DOCLING_PARSE_BUILD_STRUCTURE_TESTS)
target_link_libraries(structure_concurrency PRIVATE ${DEPENDENCIES} ${LIB_LINK})
endif()

option(DOCLING_PARSE_BUILD_MEMORY_PROBE "Build the native line-memory probe" OFF)
if(DOCLING_PARSE_BUILD_MEMORY_PROBE)
add_executable(test_memory_on_lines tests/cpp/test_memory_on_lines.cpp)
add_dependencies(test_memory_on_lines ${DEPENDENCIES})
target_link_libraries(test_memory_on_lines PRIVATE ${DEPENDENCIES} ${LIB_LINK})
target_compile_definitions(test_memory_on_lines PRIVATE DOCLING_PARSE_CONTENT_DIAGNOSTICS=1)

add_executable(stream_callback_regression tests/cpp/test_stream_callbacks.cpp)
add_dependencies(stream_callback_regression ${DEPENDENCIES})
target_link_libraries(stream_callback_regression PRIVATE ${DEPENDENCIES} ${LIB_LINK})
enable_testing()
add_test(NAME stream_callback_regression COMMAND stream_callback_regression)
set_tests_properties(stream_callback_regression PROPERTIES TIMEOUT 30)

add_executable(stream_state_lifetime_regression tests/cpp/test_stream_state_lifetimes.cpp)
add_dependencies(stream_state_lifetime_regression ${DEPENDENCIES})
target_link_libraries(stream_state_lifetime_regression PRIVATE ${DEPENDENCIES} ${LIB_LINK})
target_compile_definitions(stream_state_lifetime_regression PRIVATE
DOCLING_PARSE_CONTENT_DIAGNOSTICS=1 DOCLING_PARSE_STATE_LIFETIME_TESTING=1)
add_test(NAME stream_state_lifetime_regression COMMAND stream_state_lifetime_regression)
set_tests_properties(stream_state_lifetime_regression PROPERTIES TIMEOUT 30)

add_executable(clip_history_regression tests/cpp/test_clip_history.cpp)
add_dependencies(clip_history_regression ${DEPENDENCIES})
target_link_libraries(clip_history_regression PRIVATE ${DEPENDENCIES} ${LIB_LINK})
add_test(NAME clip_history_regression COMMAND clip_history_regression)
set_tests_properties(clip_history_regression PROPERTIES TIMEOUT 30)
endif()

# Test the native library directly: the renderer's curve-flattening workaround
# (#407) otherwise bypasses the stroker routines patched for #396/#400/#401.
option(DOCLING_PARSE_BUILD_BLEND2D_TESTS "Build native Blend2D patch regression tests" OFF)
Expand Down
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,10 @@ host. Run with `loglevel="info"` to see which file was chosen for each font.

The tooling behind it lives under [`scripts/benchmarking/`](./scripts/benchmarking/README.md):

Publish an existing run with `uv run python scripts/tools/update_performance_docs.py --performance-run-dir RUN`
(preview), then add `--apply` after review. Results are organized by dataset and CPU/setup;
publication enforces documentation and image size budgets before writing files.

- [`scripts/benchmarking/run_performance_benchmarking.py`](./scripts/benchmarking/run_performance_benchmarking.py): measure — thread-scaling sweeps and the cross-package comparison
- [`scripts/benchmarking/run_performance_eval.py`](./scripts/benchmarking/run_performance_eval.py): plot — per-page distributions, thread scaling, and per-package correlations
- [`scripts/benchmarking/run_performance_analysis.py`](./scripts/benchmarking/run_performance_analysis.py): drill down — replay the slowest pages with C++ stage timings
Expand Down
681 changes: 109 additions & 572 deletions docs/performance_benchmarks.md

Large diffs are not rendered by default.

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
208 changes: 0 additions & 208 deletions docs/performance_benchmarks/2026-11-bo767-m3-max/provenance.json

This file was deleted.

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading