Skip to content

Add optional warmup prop and bump docxodus to 6.2.0#20

Merged
JSv4 merged 1 commit into
mainfrom
add-warmup-api
May 29, 2026
Merged

Add optional warmup prop and bump docxodus to 6.2.0#20
JSv4 merged 1 commit into
mainfrom
add-warmup-api

Conversation

@JSv4

@JSv4 JSv4 commented May 29, 2026

Copy link
Copy Markdown
Owner

Summary

  • Bump docxodus to ^6.2.0 and refresh the bundled WASM files in public/wasm.
  • Expose an optional warmup boolean prop on DocumentViewer. When true, the viewer eagerly calls the worker's new prepare() API once the worker is ready, pre-warming the .NET comparison assemblies so the first compareDocuments avoids the ~3s assembly-load latency. The call is idempotent and fire-and-forget (warmup failures never surface as viewer errors).
  • warmup only applies in worker mode (useWorker true, the default); it is a no-op when useWorker={false}, since prepare() only exists on the worker.
  • Bump the docxodus peer dependency to >=6.2.
  • Release v0.6.0 (minor bump).

Tests

Added three tests covering the new prop (mocking docxodus/worker):

  • does not pre-warm when warmup is unset
  • calls prepare() once when warmup is set in worker mode
  • no-op (no prepare() call, no crash) in non-worker mode

npm test (33 passed), npm run lint (clean), and npm run build all pass.

Bump docxodus to ^6.2.0 and refresh bundled WASM files. Expose an
optional `warmup` boolean prop on DocumentViewer that eagerly calls the
worker's new `prepare()` API on mount, pre-warming the comparison code
path so the first comparison avoids the ~3s assembly-load latency. The
prop is a no-op in non-worker mode. Bump peer dependency to docxodus
>=6.2 and release v0.6.0.
@JSv4 JSv4 merged commit bfb0648 into main May 29, 2026
3 checks passed
@JSv4 JSv4 deleted the add-warmup-api branch May 29, 2026 00:47
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.

1 participant