Repository navigation
Conversation
Stack context: TSP vs pyrefly LSP latency benchmarks on PyTorch. - What: add `tsp/pytorch_cold_start` to `benches/tsp/pytorch.rs`. Each sample starts a fresh server, initializes it, and opens `torch/_inductor/ir.py`. LSP: then `textDocument/diagnostic`. TSP: then a replay of the 17,494 requests that Pylance sent after opening the file until it went quiet, mostly its background checker's sweep of the file plus ~1.1k `resolveImport`. - Why: opening a slow file is where TSP costs the most. The sweep on open touches the same ~90 dependency modules as a re-check, but none of them are solved yet. Test Plan: ``` PYREFLY_LOG=off buck2 run @fbcode//mode/opt fbcode//pyrefly/pyrefly:tsp_bench -- --bench --noplot pytorch_cold_start ``` | group | lsp | tsp | |---|---|---| | `tsp/pytorch_cold_start` | 1.46 s | 7.87 s |
This was referenced Oct 29, 2026
This branch has not been deployed
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.
Stack (review and merge in order):
Stack context: TSP vs pyrefly LSP latency benchmarks on PyTorch.
tsp/pytorch_cold_starttobenches/tsp/pytorch.rs. Each sample starts a fresh server, initializes it, and openstorch/_inductor/ir.py. LSP: thentextDocument/diagnostic. TSP: then a replay of the 17,494 requests that Pylance sent after opening the file until it went quiet, mostly its background checker's sweep of the file plus ~1.1kresolveImport.Test Plan:
tsp/pytorch_cold_start