[0146] 焦点图标工具栏性能优化#3445
Open
da-liii wants to merge 10 commits into
Open
Conversation
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
- get_style_menu() 等 4 个函数添加 static object cache,避免重复调用 descendance + eval - menu-expand-link 中添加 static-menu-link? 识别静态菜单,缓存展开结果 - 添加诊断日志用于定位 menu-expand 递归展开的耗时分布 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
hidden_package 每次调用都重新执行 descendance("$TEXMACS_PACKAGE_ROOT")
扫描文件系统,4个包累计耗时 67ms。改为 static 局部变量缓存后降至
~14ms,resume 总耗时从 245ms 降至 155ms。
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
移除 menu-expand-link、menu-expand-dynamic、menu-expand-list 中的 texmacs-time 计时和 display* 输出。 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
还原 focus-variants-of、cursor-inside?、focus-has-preferences?、 focus-has-parameters? 中的 texmacs-time 计时包装和 display* 输出。 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
- 将 hidden_package 从逐包递归遍历改为预构建 hash set,查找 O(1)
- 复用 descendance("$TEXMACS_PACKAGE_ROOT") 结果,避免重复扫描
- 在 init_texmacs 启动阶段触发 ensure_hidden_package_set,不再延迟到菜单展开
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
hidden_package的descendance调用结果,避免每次检查包是否隐藏时重复扫描文件系统(67ms → 14ms)style-menu/add-package-menu等静态菜单的展开结果,避免重复构建性能改善
hidden_package过滤resume总耗时Test plan
🤖 Generated with Claude Code