Repository navigation
feat: avoid padded-grid allocation in table exports - #1
Merged
Merged
Conversation
npkanaka
marked this pull request as ready for review
October 9, 2026 19:48
AI triage (advisory)Checked commit Warning The AI analysis did not finish. Only the deterministic checks are shown. CI safety: needs maintainer care before you approve CI.
The |
2 tasks done
sks
added a commit
that referenced
this pull request
Oct 12, 2026
## Summary - Add opt-in record-oriented table output for Markdown exports. The default Markdown table format does not change. - Support `--markdown-table-format records` in `convert` and `convert-remote`. Remote conversion still applies the option only when writing Markdown locally. - Provide `export_to_record_markdown()` and `save_as_record_markdown()` for packaged SDK users. Keep image modes and other output formats unchanged. - Remove the fork-specific Serve integration from PR #1. The serializer does not replace a process-wide Core serializer. This branch is based on the current `stackgenhq/main`. [Draft PR #2](#2) contains the initial serializer. The [branch comparison](feat/record-table-serializer...feat/record-table-export-dmain) now shows only the 11-file opt-in addition, without unrelated upstream commits. ## Checks - Selected tests: 164 passed, 2 deselected (`test_cli_convert`), 91 warnings. - `make validate` passed on the 11-file opt-in changeset. - `git diff --check` passed. - Full repository test suite and `make check` were not run for this PR. This export option does not address conversion memory use or add a Docling Serve-wide option. A general Markdown serializer API remains a `docling-core` design decision. - [x] Documentation updated - [x] Tests added
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Add an opt-in, record-oriented Markdown table exporter and a CPU-only serving image built from this repository. Table exports retain actual values without allocating a padded rectangular grid.
Why
Wide, sparse tables can use excessive memory during export. Iterating existing cells avoids padding missing positions while retaining explicit empty fields, coordinates, header flags and merged ranges.
Thought
Keep the structured document model and other export formats unchanged. Enable the exporter through a process-local startup factory so normal, worker and reload processes use the same behavior. Build the converter and adapter from the checkout, with a pinned runtime and installed-source verification.
Alternatives considered
Blindspots
ELI5
Read the filled squares in a spreadsheet instead of creating every empty square in a huge rectangle.
Test plan
See
integrations/stackgen_serve/README.mdfor build commands and limits.