Skip to content

perf(docs): coalesce changeset render refreshes - #7477

Merged
DR-Univer merged 1 commit into
devfrom
feat/reduce-render-overhead
Aug 11, 2026
Merged

perf(docs): coalesce changeset render refreshes#7477
DR-Univer merged 1 commit into
devfrom
feat/reduce-render-overhead

Conversation

@DR-Univer

@DR-Univer DR-Univer commented Aug 11, 2026

Copy link
Copy Markdown
Member

Summary

  • coalesce synchronous changeset-driven document layout refreshes into one microtask
  • schedule drawing refresh only after the coalesced document layout pass
  • avoid repeated document layout and drawing work while embedded Slide thumbnails settle

Why

Slide thumbnails can mount embedded documents while collaboration changesets are replayed. Refreshing layout and drawing for every synchronous changeset caused redundant work and delayed stable thumbnail capture.

Paired Pro PR

  • dream-num/univer-pro#5476

Validation

  • targeted Vitest coverage for the document render controller
  • typecheck for @univerjs/docs-ui and @univerjs/docs-drawing-ui
  • ESLint on all changed files (0 errors)
  • outer repository convention checker
  • git diff --check

Scope

This PR contains only the Docs rendering changes created in the paired Slide thumbnail session. Sheet low-zoom rendering work from a separate task is not included.

@DR-Univer
DR-Univer marked this pull request as ready for review August 11, 2026 11:20
@DR-Univer
DR-Univer force-pushed the feat/reduce-render-overhead branch from 35c28c6 to 3b6c609 Compare August 11, 2026 11:20
@github-actions

github-actions Bot commented Aug 11, 2026

Copy link
Copy Markdown

Playwright test results

passed  10 passed

Details

stats  10 tests across 4 suites
duration  4 minutes, 15 seconds
commit  9a52fcb
info  For more information, see full report and artifacts

@codecov

codecov Bot commented Aug 11, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 39.13043% with 28 lines in your changes missing coverage. Please review.
✅ Project coverage is 81.05%. Comparing base (04a7e8e) to head (9a52fcb).

Files with missing lines Patch % Lines
...rollers/doc-drawing-transform-update.controller.ts 0.00% 25 Missing ⚠️
...ollers/render-controllers/doc.render-controller.ts 85.71% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##              dev    #7477      +/-   ##
==========================================
- Coverage   81.06%   81.05%   -0.01%     
==========================================
  Files        2689     2689              
  Lines      167226   167259      +33     
  Branches    41046    41299     +253     
==========================================
+ Hits       135562   135575      +13     
- Misses      31612    31632      +20     
  Partials       52       52              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@DR-Univer
DR-Univer force-pushed the feat/reduce-render-overhead branch 2 times, most recently from dfa8b79 to 9a52fcb Compare August 11, 2026 12:14
@DR-Univer DR-Univer changed the title perf: reduce redundant document and sheet rendering perf(docs): coalesce changeset render refreshes Aug 11, 2026
@DR-Univer
DR-Univer merged commit 0a8432f into dev Aug 11, 2026
20 checks passed
@DR-Univer
DR-Univer deleted the feat/reduce-render-overhead branch August 11, 2026 12:21
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