Repository navigation
Conversation
There was a problem hiding this comment.
All reported issues were addressed across 6 files
Shadow auto-approve: would not auto-approve because issues were found.
Re-trigger cubic
There was a problem hiding this comment.
0 issues found across 2 files (changes from recent commits).
Shadow auto-approve: would not auto-approve. Auto-approval blocked by 3 unresolved issues from previous reviews.
Re-trigger cubic
# Conflicts: # CHANGELOG.md
There was a problem hiding this comment.
0 issues found across 1 file (changes from recent commits).
Shadow auto-approve: would not auto-approve. This PR does not meet the repository auto-approval settings.
Re-trigger cubic
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
There was a problem hiding this comment.
No issues found across 7 files
Shadow auto-approve: would not auto-approve. This PR does not meet the repository auto-approval settings.
Re-trigger cubic
…IO#4563) ## What `partition_xlsx()` with subtable detection (the default) needs substantially less memory on dense worksheets, and the saving grows with sheet size. Output is unchanged. On synthetic dense sheets (a ten-column sheet split into three dense subtables, half integers, half short Unicode strings), peak RSS in a fresh process drops by roughly 40–60% depending on size, with comparable runtime. Working memory per populated cell drops to roughly a third. Serialized element JSON is byte-identical before and after. ## Why Two whole-sheet intermediates dominated memory on dense sheets: 1. **Subtable detection built a NetworkX graph** with a node per populated cell and an edge per neighbor pair. It now uses an iterative four-neighbor flood fill over populated cells (the approach from Unstructured-IO#4357), with the same component admission order, cell membership, row-overlap merging, table order and bounding boxes. 2. **Table HTML was rendered for the whole table at once** (pandas `to_html` string, its parsed DOM and a full-table token list). Rows are now formatted by pandas' formatter for the whole column, so float/date/string formatting is unchanged, and each row is rendered and parsed on its own before the next. `networkx` is no longer needed at runtime by the XLSX partitioner, so it moves from the `xlsx` extra to the test dependencies (it's still used by other extras that depend on it). ## Behavior - Same elements, text, `text_as_html` and metadata; exact-output tests cover mixed types, NaN/empty cells, wide floats that switch to scientific notation in another row, dates and HTML escaping. - The renderer uses pandas' private formatter classes, as the existing reader already does for `OpenpyxlReader`. Verified on pandas 2.1.4 (renderer-parity comparisons), 2.2.3 and 2.3.3. - The worksheet cell limit, empty-row compaction, empty-sheet handling and XLS padding handling are unchanged. ## Validation - XLSX and dense-memory suites pass. New tests compare component detection and rendered HTML against the previous implementation on generated sheets. - Ruff check/format pass. ## Release Sets the release to **0.27.32** (0.27.31 was taken by Unstructured-IO#4538, which merged first). It merges after Unstructured-IO#4419, Unstructured-IO#4516, Unstructured-IO#4517 and Unstructured-IO#4562, and its CHANGELOG collects their entries and this one into a single 0.27.32 section. Unstructured-IO#4524 and Unstructured-IO#4523 are not included and will go into a later release. Supersedes Unstructured-IO#4357. <!-- This is an auto-generated description by cubic. --> <a href="https://cubic.dev/pr/Unstructured-IO/unstructured/pull/4563?utm_source=github" target="_blank" rel="noopener noreferrer" data-no-image-dialog="true"><picture><source media="(prefers-color-scheme: dark)" srcset="https://www.cubic.dev/buttons/review-in-cubic-dark.svg"><source media="(prefers-color-scheme: light)" srcset="https://www.cubic.dev/buttons/review-in-cubic-light.svg"><img alt="View guided diff" src="https://www.cubic.dev/buttons/review-in-cubic-light.svg"></picture></a> <!-- End of auto-generated description by cubic. -->
Summary
Replace worksheet-sized NetworkX graph construction with traversal over populated cells. Preserve four-neighbor connectivity, row-overlap merging, element ordering, text, HTML, and metadata. NetworkX remains a test dependency for comparison with the previous algorithm, and is removed from the XLSX runtime extra.
Compatibility
No new file-size, row, cell, or processing limit is introduced. Parsing, populated-cell semantics, and table rendering are unchanged. Exact serialized output matches the old algorithm for generated multi-sheet workbooks across header/HTML options and six existing XLSX fixtures. This is evidence of compatibility, not a guarantee for every possible workbook. Pandas still materializes worksheet data and a boolean mask; memory is reduced, not capped.
Validation
Synced with current main on October 1, 2026 (released as 0.27.15).
These measure component detection, not total API latency. Peak RSS is sampled every 5 ms, so it is a lower bound on the true peak.