Repository navigation
[6019] 优化长篇分页文档启动排版性能:流式渐进排版与即时调度 - #4714
Merged
Merged
Conversation
Co-Authored-By: Claude <[email protected]>
Co-Authored-By: Claude <[email protected]>
Co-Authored-By: Claude <[email protected]>
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.
适用范围
本优化仅针对分页介质的长篇文档生效:
PAGE_MEDIUM == "paper")、非打印/导出状态(!is_printing)且段落数达到长篇规模(n >= 60);papyrus)、短篇文档(n < 60)以及 PDF 打印导出等场景,依然保持原有一次性全量排版逻辑,完全不受影响。问题描述
在打开超长分页文档(例如包含上万页、数十万行的长篇书籍/文档)时,原排版流程存在严重的冷启动阻塞:
break_pages一次性计算全部数万页的断页与 Box 构造,导致窗口主线程卡死长达 30~40 秒以上;优化方案
10 页),保存跨页边界3 秒内(实现秒开);stack_border、排版环境edit_env与段落游标断点,立即生成初始页面交付视口渲染,首屏呈现耗时缩短至 2文档正在后台排版中,已跳至当前就绪页面...,右侧提示排版进度。测试与验收
papyrus)及短篇文档排版逻辑保持原样,功能与渲染完全兼容。