nigig-org/tools/analysis
2026-09-27 16:25:50 +03:00
..
pdf_drawcall_census.rs wip(daily-reports): preserve local site/report/worker, ocr and lite-common updates for Phase 0 freeze 2026-09-27 16:25:50 +03:00
README.md docs(pdf): does the PDF viewport have a minimal-drawcall strategy? No -- and the renderer is unwired 2026-08-21 05:04:41 +00:00

Analysis harnesses

One-off measurement programs kept out of the crate tree: they are not part of any build, and are here so a number in a REVIEWS document can be reproduced rather than trusted.

pdf_drawcall_census.rs

Backs REVIEWS/PDF_DRAWCALL_STRATEGY_ANALYSIS.md. Replays every parseable page in crates/apps/pdf/tests/corpus through the same finish_path state machine as pdf-makepad/src/renderer.rs, and counts the draw calls the renderer would issue.

To run it, drop it into a standalone workspace holding the three engine crates and invoke it as an example:

W=$(mktemp -d); cd crates/apps/pdf
cp -a pdf-cos pdf-document pdf-graphics tests "$W"/
rm -rf "$W"/pdf-cos/fuzz
printf '[workspace]\nmembers = ["pdf-cos","pdf-document","pdf-graphics"]\nresolver = "2"\n' > "$W"/Cargo.toml
mkdir -p "$W"/pdf-graphics/examples
cp tools/analysis/pdf_drawcall_census.rs "$W"/pdf-graphics/examples/
cd "$W" && cargo run --release -p nigig-pdf-graphics \
    --example pdf_drawcall_census -- tests/corpus

It reads only; it changes nothing.