[1150] 新增表格插入行基准 + chat-input-buffer? unbound 修复#4041
Merged
Conversation
新增 TeXmacs/tests/1150.scm:headless 基准,建 1×1 表格后连续插 1000 行, 输出总耗时与单行均值,作为后续表格插入路径优化的对比基线。 修复阻塞基准跑起来的根因:chat-input-buffer? 由 llm 插件懒加载定义, 插件未加载(headless 测试、未启用 chat 的发行)时符号 unbound,导致 任何非 chat 路径下做表格插入/粘贴都抛 unbound-variable。四处调用点 (table-resize-notify / kbd-paste / ocr-paste / 选择性粘贴)加 (defined? 'chat-input-buffer?) guard。menu 的 :require gating 不受影响。 实测(Linux release):1000 行 ≈ 7145 ms,单行 ~7 ms。本次不做表格 插入路径的性能优化。
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
TeXmacs/tests/1150.scm:headless 基准,(make 'tabular)建表后连续(table-insert-row #t)1000 次,输出总耗时与单行均值。作为后续表格插入路径优化的对比基线。chat-input-buffer?由 llm 插件懒加载定义,插件未加载(headless 测试、未启用 chat 的发行)时符号 unbound,任何非 chat 路径下做表格插入/粘贴都会抛unbound-variable。四处调用点加(defined? 'chat-input-buffer?)guard:TeXmacs/progs/table/table-edit.scm—table-resize-notify(基准触发的就是这条)TeXmacs/progs/generic/generic-edit.scm—kbd-paste与 ocr-paste 路径TeXmacs/progs/generic/paste-widget.scm— 选择性粘贴Test plan
xmake b stem编译通过xmake r 1150输出[1150] insert 1000 rows: total=7145 ms, per-row=...xmake r 1144等已有测试无回归(unbound 不再抛)gf fmt --changed-since=main已格式化🤖 Generated with Claude Code