Skip to content

优化 Python 性能

Andy Stewart edited this page Feb 24, 2023 · 1 revision
  1. 开启性能剖析选项: (setq lsp-bridge-enable-profile t)
  2. 重启 lsp-bridge: lsp-bridge-restart-process
  3. 正常写代码, 进行补全操作, 时间越长越好
  4. 输出性能剖析日志: lsp-bridge-profile-dump
  5. 安装 snakeviz: sudo pip3 install snakeviz
  6. 展示性能瓶颈: snakeviz ~/lsp-bridge.prof