Skip to content

Benchmark and optimize Open XML workbook calculation and I/O - #105

Merged
jochenwezel merged 2 commits into
mainfrom
codex/openxml-performance-69
Dec 4, 2026
Merged

jochenwezel merged 2 commits into
mainfrom
codex/openxml-performance-69

Conversation

@jochenwezel

@jochenwezel jochenwezel commented Dec 4, 2026 •

Copy link
Copy Markdown
Member

Summary

  • Add repeatable synthetic XLSX I/O, matrix and external-dependency benchmarks, a desktop Excel reference mode, and a local private-corpus mode. The OpenCL comparison stays in the benchmark tool.
  • Speed up edits that fan out across many formulas, insert missing spill result cells in worksheet order, and write eligible worksheet parts directly during save-copy.
  • Add an explicit background action to prepare one shared reverse index from dependencies recorded by a full calculation. It publishes only for the captured graph and session. The usual calculation path remains available as the fallback.

Validation

  • Regression coverage includes ordered callbacks, changed indirect targets, rejection of a captured index after a formula edit or reversal, fixed-array spill insertion, and worksheet namespace and extension preservation.
  • The API documentation check passed with zero missing or incomplete entries. The local .NET 8 Open XML suite, filtered to engine tests outside desktop Excel Interop, passed 1,227 tests.
  • The depth-16, fan-out-64 synthetic edit took 25.1 ms with on-demand indexing and 20.8 ms with a prepared index, with 2.5 ms of separate warm preparation. The single fresh-process sample did not benefit. The benchmark documentation records the earlier A/B measurements and how to reproduce the runs.
  • Private workbook inputs, generated copies, and detailed results are kept local.

Closes #69

@github-actions

github-actions Bot commented Dec 4, 2026 •

Copy link
Copy Markdown

Unit Test Statistics (ubuntu-latest) CompuMaster.MsExcelComInteropTest.dll

10 tests  ±0   10 ✅ ±0   0s ⏱️ ±0s
 1 suites ±0    0 💤 ±0 
 1 files   ±0    0 ❌ ±0 

Results for commit d5abe93. ± Comparison against base commit dfd6030.

♻️ This comment has been updated with latest results.

@github-actions

github-actions Bot commented Dec 4, 2026 •

Copy link
Copy Markdown

Unit Test Statistics (ubuntu-latest) CompuMaster.Excel.Test.dll

    1 files  ± 0      1 suites  ±0   1m 3s ⏱️ +18s
1 754 tests +12  1 754 ✅ +12  0 💤 ±0  0 ❌ ±0 
1 856 runs  +12  1 856 ✅ +12  0 💤 ±0  0 ❌ ±0 

Results for commit d5abe93. ± Comparison against base commit dfd6030.

This pull request removes 2 and adds 14 tests. Note that renamed tests count towards both.
CompuMaster.Excel.Test.OpenXmlAutomaticFormulaTest ‑ FollowsChangingIndirectTargetsThroughAnOffsetInBothCalculationModes
CompuMaster.Excel.Test.OpenXmlAutomaticFormulaTest ‑ ResolvesTextReferencesAcrossOpenWorkbooksAndTracksSourceEdits
CompuMaster.Excel.Test.OpenXmlAutomaticFormulaTest ‑ FollowsChangingIndirectTargetsThroughAnOffsetInBothCalculationModes(False)
CompuMaster.Excel.Test.OpenXmlAutomaticFormulaTest ‑ FollowsChangingIndirectTargetsThroughAnOffsetInBothCalculationModes(True)
CompuMaster.Excel.Test.OpenXmlAutomaticFormulaTest ‑ OrdersIndexedCellAndRangeDependentsAndEvaluatesEachOnce(False)
CompuMaster.Excel.Test.OpenXmlAutomaticFormulaTest ‑ OrdersIndexedCellAndRangeDependentsAndEvaluatesEachOnce(True)
CompuMaster.Excel.Test.OpenXmlAutomaticFormulaTest ‑ RejectsAnIndexCapturedBeforeAFormulaEdit(False)
CompuMaster.Excel.Test.OpenXmlAutomaticFormulaTest ‑ RejectsAnIndexCapturedBeforeAFormulaEdit(True)
CompuMaster.Excel.Test.OpenXmlAutomaticFormulaTest ‑ ResolvesTextReferencesAcrossOpenWorkbooksAndTracksSourceEdits(False)
CompuMaster.Excel.Test.OpenXmlAutomaticFormulaTest ‑ ResolvesTextReferencesAcrossOpenWorkbooksAndTracksSourceEdits(True)
CompuMaster.Excel.Test.OpenXmlFormulaCalculationTest ‑ WritesNewFixedArrayCellsBetweenAndAfterExistingCells
CompuMaster.Excel.Test.OpenXmlWorksheetSerializationTest ‑ SaveChangedWorksheetPreservesDefaultNamespaceAndExtensionContent("",False)
…

♻️ This comment has been updated with latest results.

@github-actions

github-actions Bot commented Dec 4, 2026 •

Copy link
Copy Markdown

Unit Test Statistics (ubuntu-latest) CompuMaster.Excel.TestFreeSpireXls.dll

6 tests  ±0   6 ✅ ±0   0s ⏱️ ±0s
1 suites ±0   0 💤 ±0 
1 files   ±0   0 ❌ ±0 

Results for commit d5abe93. ± Comparison against base commit dfd6030.

♻️ This comment has been updated with latest results.

@github-actions

github-actions Bot commented Dec 4, 2026 •

Copy link
Copy Markdown

Unit Test Statistics (ubuntu-latest) CompuMaster.Excel.TestSpireXls.dll

6 tests  ±0   6 ✅ ±0   0s ⏱️ ±0s
1 suites ±0   0 💤 ±0 
1 files   ±0   0 ❌ ±0 

Results for commit d5abe93. ± Comparison against base commit dfd6030.

♻️ This comment has been updated with latest results.

@github-actions

github-actions Bot commented Dec 4, 2026 •

Copy link
Copy Markdown

Unit Test Statistics (macos-latest) CompuMaster.MsExcelComInteropTest.dll

10 tests  ±0   10 ✅ ±0   0s ⏱️ ±0s
 1 suites ±0    0 💤 ±0 
 1 files   ±0    0 ❌ ±0 

Results for commit d5abe93. ± Comparison against base commit dfd6030.

♻️ This comment has been updated with latest results.

@github-actions

github-actions Bot commented Dec 4, 2026 •

Copy link
Copy Markdown

Unit Test Statistics (macos-latest) CompuMaster.Excel.Test.dll

    1 files  ± 0      1 suites  ±0   1m 27s ⏱️ +20s
1 754 tests +12  1 754 ✅ +12  0 💤 ±0  0 ❌ ±0 
1 856 runs  +12  1 856 ✅ +12  0 💤 ±0  0 ❌ ±0 

Results for commit d5abe93. ± Comparison against base commit dfd6030.

This pull request removes 2 and adds 14 tests. Note that renamed tests count towards both.
CompuMaster.Excel.Test.OpenXmlAutomaticFormulaTest ‑ FollowsChangingIndirectTargetsThroughAnOffsetInBothCalculationModes
CompuMaster.Excel.Test.OpenXmlAutomaticFormulaTest ‑ ResolvesTextReferencesAcrossOpenWorkbooksAndTracksSourceEdits
CompuMaster.Excel.Test.OpenXmlAutomaticFormulaTest ‑ FollowsChangingIndirectTargetsThroughAnOffsetInBothCalculationModes(False)
CompuMaster.Excel.Test.OpenXmlAutomaticFormulaTest ‑ FollowsChangingIndirectTargetsThroughAnOffsetInBothCalculationModes(True)
CompuMaster.Excel.Test.OpenXmlAutomaticFormulaTest ‑ OrdersIndexedCellAndRangeDependentsAndEvaluatesEachOnce(False)
CompuMaster.Excel.Test.OpenXmlAutomaticFormulaTest ‑ OrdersIndexedCellAndRangeDependentsAndEvaluatesEachOnce(True)
CompuMaster.Excel.Test.OpenXmlAutomaticFormulaTest ‑ RejectsAnIndexCapturedBeforeAFormulaEdit(False)
CompuMaster.Excel.Test.OpenXmlAutomaticFormulaTest ‑ RejectsAnIndexCapturedBeforeAFormulaEdit(True)
CompuMaster.Excel.Test.OpenXmlAutomaticFormulaTest ‑ ResolvesTextReferencesAcrossOpenWorkbooksAndTracksSourceEdits(False)
CompuMaster.Excel.Test.OpenXmlAutomaticFormulaTest ‑ ResolvesTextReferencesAcrossOpenWorkbooksAndTracksSourceEdits(True)
CompuMaster.Excel.Test.OpenXmlFormulaCalculationTest ‑ WritesNewFixedArrayCellsBetweenAndAfterExistingCells
CompuMaster.Excel.Test.OpenXmlWorksheetSerializationTest ‑ SaveChangedWorksheetPreservesDefaultNamespaceAndExtensionContent("",False)
…

♻️ This comment has been updated with latest results.

@github-actions

github-actions Bot commented Dec 4, 2026 •

Copy link
Copy Markdown

Unit Test Statistics (macos-latest) CompuMaster.Excel.TestFreeSpireXls.dll

6 tests  ±0   6 ✅ ±0   1s ⏱️ -1s
1 suites ±0   0 💤 ±0 
1 files   ±0   0 ❌ ±0 

Results for commit d5abe93. ± Comparison against base commit dfd6030.

♻️ This comment has been updated with latest results.

@github-actions

github-actions Bot commented Dec 4, 2026 •

Copy link
Copy Markdown

Unit Test Statistics (macos-latest) CompuMaster.Excel.TestSpireXls.dll

6 tests  ±0   6 ✅ ±0   0s ⏱️ ±0s
1 suites ±0   0 💤 ±0 
1 files   ±0   0 ❌ ±0 

Results for commit d5abe93. ± Comparison against base commit dfd6030.

♻️ This comment has been updated with latest results.

@github-actions

github-actions Bot commented Dec 4, 2026 •

Copy link
Copy Markdown

Unit Test Statistics (windows-latest) CompuMaster.MsExcelComInteropTest.dll

10 tests  ±0   10 ✅ ±0   0s ⏱️ ±0s
 1 suites ±0    0 💤 ±0 
 1 files   ±0    0 ❌ ±0 

Results for commit d5abe93. ± Comparison against base commit dfd6030.

♻️ This comment has been updated with latest results.

@github-actions

github-actions Bot commented Dec 4, 2026 •

Copy link
Copy Markdown

Unit Test Statistics (windows-latest) CompuMaster.Excel.Test.dll

    1 files  ± 0      1 suites  ±0   1m 59s ⏱️ +2s
2 737 tests +12  2 737 ✅ +12  0 💤 ±0  0 ❌ ±0 
2 839 runs  +12  2 839 ✅ +12  0 💤 ±0  0 ❌ ±0 

Results for commit d5abe93. ± Comparison against base commit dfd6030.

This pull request removes 2 and adds 14 tests. Note that renamed tests count towards both.
CompuMaster.Excel.Test.OpenXmlAutomaticFormulaTest ‑ FollowsChangingIndirectTargetsThroughAnOffsetInBothCalculationModes
CompuMaster.Excel.Test.OpenXmlAutomaticFormulaTest ‑ ResolvesTextReferencesAcrossOpenWorkbooksAndTracksSourceEdits
CompuMaster.Excel.Test.OpenXmlAutomaticFormulaTest ‑ FollowsChangingIndirectTargetsThroughAnOffsetInBothCalculationModes(False)
CompuMaster.Excel.Test.OpenXmlAutomaticFormulaTest ‑ FollowsChangingIndirectTargetsThroughAnOffsetInBothCalculationModes(True)
CompuMaster.Excel.Test.OpenXmlAutomaticFormulaTest ‑ OrdersIndexedCellAndRangeDependentsAndEvaluatesEachOnce(False)
CompuMaster.Excel.Test.OpenXmlAutomaticFormulaTest ‑ OrdersIndexedCellAndRangeDependentsAndEvaluatesEachOnce(True)
CompuMaster.Excel.Test.OpenXmlAutomaticFormulaTest ‑ RejectsAnIndexCapturedBeforeAFormulaEdit(False)
CompuMaster.Excel.Test.OpenXmlAutomaticFormulaTest ‑ RejectsAnIndexCapturedBeforeAFormulaEdit(True)
CompuMaster.Excel.Test.OpenXmlAutomaticFormulaTest ‑ ResolvesTextReferencesAcrossOpenWorkbooksAndTracksSourceEdits(False)
CompuMaster.Excel.Test.OpenXmlAutomaticFormulaTest ‑ ResolvesTextReferencesAcrossOpenWorkbooksAndTracksSourceEdits(True)
CompuMaster.Excel.Test.OpenXmlFormulaCalculationTest ‑ WritesNewFixedArrayCellsBetweenAndAfterExistingCells
CompuMaster.Excel.Test.OpenXmlWorksheetSerializationTest ‑ SaveChangedWorksheetPreservesDefaultNamespaceAndExtensionContent("",False)
…

♻️ This comment has been updated with latest results.

@github-actions

github-actions Bot commented Dec 4, 2026 •

Copy link
Copy Markdown

Unit Test Statistics (windows-latest) CompuMaster.Excel.TestFreeSpireXls.dll

161 tests  ±0   161 ✅ ±0   21s ⏱️ ±0s
  1 suites ±0     0 💤 ±0 
  1 files   ±0     0 ❌ ±0 

Results for commit d5abe93. ± Comparison against base commit dfd6030.

♻️ This comment has been updated with latest results.

@github-actions

github-actions Bot commented Dec 4, 2026 •

Copy link
Copy Markdown

Unit Test Statistics (windows-latest) CompuMaster.Excel.TestSpireXls.dll

163 tests  ±0   163 ✅ ±0   23s ⏱️ -1s
  1 suites ±0     0 💤 ±0 
  1 files   ±0     0 ❌ ±0 

Results for commit d5abe93. ± Comparison against base commit dfd6030.

♻️ This comment has been updated with latest results.

@jochenwezel
jochenwezel merged commit a02cd65 into main Dec 4, 2026
19 checks passed
@jochenwezel
jochenwezel deleted the codex/openxml-performance-69 branch December 4, 2026 11:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Benchmark and tune Open XML calculation and workbook I/O

1 participant