perf(docs): coalesce changeset render refreshes - #7478
Closed
DR-Univer wants to merge 1 commit into
Closed
Conversation
Member
Author
|
Consolidated into #7477 so the document replay batching and dense Sheet rendering optimizations ship in one OSS PR paired with dream-num/univer-pro#5476. |
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.
Summary
fromChangesetDoc mutations into one layout/render refreshContext
Snapshot replay already marks mutation execution with
IExecutionOptions.fromChangeset. The Doc render consumers ignored that boundary and recalculated layout and drawings for every replayed mutation. A local 1,464-mutation document took about 51.0 seconds to open. With this change, three runs completed in 2.93–3.27 seconds (3.09-second median).Architecture
This stays at the render-consumer boundary in
docs-uianddocs-drawing-ui. It does not move replay semantics intoCommandService, duplicate model behavior, or add UI-specific Facade APIs. No SDK dependency versions change, and the change does not rely on unpublished SDK behavior.Validation
pnpm exec eslint packages/docs-ui/src/controllers/render-controllers/doc.render-controller.ts packages/docs-ui/src/controllers/__tests__/doc-render-controller.spec.ts packages/docs-drawing-ui/src/controllers/render-controllers/doc-drawing-transform-update.controller.ts(0 errors; 2 pre-existing function-length warnings)pnpm exec vitest run packages/docs-ui/src/controllers/__tests__/doc-render-controller.spec.ts(8 passed)pnpm --filter @univerjs/docs-ui typecheckpnpm --filter @univerjs/docs-drawing-ui typecheckpnpm --filter @univerjs/docs-ui buildpnpm --filter @univerjs/docs-drawing-ui buildPull Request Checklist