Skip to content

[0048] 优化 gf fmt 性能#800

Open
da-liii wants to merge 7 commits into
mainfrom
da/0048/perf
Open

[0048] 优化 gf fmt 性能#800
da-liii wants to merge 7 commits into
mainfrom
da/0048/perf

Conversation

@da-liii
Copy link
Copy Markdown
Contributor

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

Summary

  • open-output-string 替代 string-append 优化格式化字符串拼接
  • 优化 emit-string! 跳过无换行字符串的逐字符扫描
  • 优化 tokenizesubstring 批量拷贝替代逐字符 string-append
  • 移除 make-atom/make-env 的参数校验以减少热路径开销
  • 提取 scan-content 避免 format-file 中重复读取文件

Test plan

  • xmake b goldfish 构建通过
  • bin/gf fmt 格式化功能正常
  • 相关测试用例通过

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