-
Notifications
You must be signed in to change notification settings - Fork 306
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
use local cache instead of localStorage to get repo status (#5798)
## Context Fixes #5787 and #5780 1. The PR removes the caching introduced in the vscode `localStorage` in the [PR](https://github.com/sourcegraph/cody/pull/5767/files#diff-795b77ed195550f3e764295bad38afdec49b0f2ad96476c63c945df119b561f7R40) to get the repo status, and uses local cache to store the results. 2. get request from `localStorage` was being triggered for every logging request [here](https://github.com/sourcegraph/cody/blob/main/vscode/src/completions/logger.ts#L741) causing the slowness in vscode workspace. ## Test plan Do this test before and after the PR commits. 1. Open multiple workspace in vscode in the debug mode. 2. Follow the steps listed by @arafatkatze [here](#5787 (comment)) to get the cpu profiling data. 4. Type something really fast. We should be able to see the lags introduced when typing. 5. In addition, use https://www.speedscope.app/ to visualize the profiling data gathered. 6. Profiling data before/after this PR <img width="1512" alt="image" src="https://github.com/user-attachments/assets/1056adbf-d57e-4470-b553-06fab83470a1"> Logs Link: 1. [after_pr_change.cpuprofile.txt](https://github.com/user-attachments/files/17250317/after_pr_change.cpuprofile.txt) 2. [before_pr_change.cpuprofile.txt](https://github.com/user-attachments/files/17250318/before_pr_change.cpuprofile.txt) ## Changelog - Fixes the vscode slowness issue when completions is turned on.
- Loading branch information
1 parent
915bb06
commit 06f62e3
Showing
6 changed files
with
45 additions
and
54 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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