Skip to content

Optimize Python performance

Andy Stewart edited this page Feb 24, 2023 · 1 revision
  1. Enable the profiler option: (setq lsp-bridge-enable-profile t)
  2. Restart lsp-bridge: lsp-bridge-restart-process
  3. Write the code normally and complete the operation, the longer the better
  4. Output profiling log: lsp-bridge-profile-dump
  5. Install snakeviz: sudo pip3 install snakeviz
  6. Show performance bottlenecks: snakeviz ~/lsp-bridge.prof