Skip to content

[0124] 缓存表格 lazy cells 状态,避免 position_columns 重复扫描#3359

Open
da-liii wants to merge 1 commit into
mainfrom
da/0124/table_perf
Open

[0124] 缓存表格 lazy cells 状态,避免 position_columns 重复扫描#3359
da-liii wants to merge 1 commit into
mainfrom
da/0124/table_perf

Conversation

@da-liii
Copy link
Copy Markdown
Contributor

@da-liii da-liii commented May 14, 2026

Summary

  • table_rep 中新增 has_lazy_cells 标志位,在 typeset_row 阶段缓存是否存在 lazy stream 单元格
  • 替换 position_columnsO(nr_rows * nr_cols) 的双重循环扫描
  • handle_decorations 中传播子表格和 decoration 的 lazy cells 状态
  • 新增 2 个 C++ 单元测试验证标志正确性
  • 提供 0124.tmu 测试文档

Test plan

  • xmake b table_performance_test 构建通过
  • xmake r table_performance_test 全部 21 个测试通过
  • 无 cell-hyphen 的表格 has_lazy_cellsfalse
  • 开启 cell-hyphen 的表格 has_lazy_cellstrue

🤖 Generated with Claude Code

在 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>
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