Repository navigation
[6021] 优化渐进式排版引擎性能:增量调度加速与全生命周期基准度量 - #4722
Merged
Merged
Conversation
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.
概要
优化渐进式流式排版调度机制与生命周期性能监控:
bench_start ("progressive_typeset: " * doc_name)埋点,排版彻底完成时调用bench_end ("progressive_typeset: " * doc_name, 0)输出整书排版端到端总耗时;THE_PROGRESSIVE变更掩码(1024):将视口外后台排版与重量级编辑通知(THE_TREE)解耦;排版切片不在视口内时跳过find_check_cursor、选区重算、菜单刷新与脏区重绘上屏,仅更新后台 Box 与滚动条范围(set_extents);needs_update ()在 Qt 空闲队列以满吞吐率极速连续推进;position_at遍历:限制position_at对历史已冻结成熟页面的全量遍历,降低深层页面累积带来的遍历开销。实测效果:
xiyouji.stem(5,896 个段落,433 页)完整排版总耗时由 120 秒以上大幅下降至 3.2 秒以内,吞吐量提升近 40 倍。