[0124] 缓存表格 lazy cells 状态,避免 position_columns 重复扫描#3359
Open
da-liii wants to merge 1 commit into
Open
Conversation
在 table_rep 中新增 has_lazy_cells 标志位,在 typeset_row 阶段缓存 是否存在 lazy stream 单元格,替换 position_columns 中 O(nr_rows * nr_cols) 的双重循环扫描。同时 handle_decorations 中传播子表格和 decoration 的 lazy cells 状态。 - table.hpp: 新增 bool has_lazy_cells 字段 - table.cpp: 初始化/设置/传播/使用该标志 - table_performance_test.cpp: 新增 2 个单元测试验证标志正确性 - devel/0124.md, 0124.tmu: 任务文档和测试文档 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
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
table_rep中新增has_lazy_cells标志位,在typeset_row阶段缓存是否存在 lazy stream 单元格position_columns中O(nr_rows * nr_cols)的双重循环扫描handle_decorations中传播子表格和 decoration 的 lazy cells 状态0124.tmu测试文档Test plan
xmake b table_performance_test构建通过xmake r table_performance_test全部 21 个测试通过has_lazy_cells为falsehas_lazy_cells为true🤖 Generated with Claude Code