Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hitesh/1.36.1 patch release #5800

Merged
merged 2 commits into from
Oct 3, 2024
Merged

Conversation

hitesh-1997
Copy link
Contributor

@hitesh-1997 hitesh-1997 commented Oct 3, 2024

  • Autocomplete: The PR fixes the slowness in vscode because because of completions by using local cache instead of querying vscode localStorage. pull/5798

Test plan

Cherry pick the PR pull/5798.

hitesh-1997 and others added 2 commits October 4, 2024 04:22
## 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.
@hitesh-1997 hitesh-1997 changed the base branch from main to vscode/1.36 October 3, 2024 22:56
@hitesh-1997 hitesh-1997 merged commit 0ad960f into vscode/1.36 Oct 3, 2024
23 checks passed
@hitesh-1997 hitesh-1997 deleted the hitesh/1.36.1-patch-release branch October 3, 2024 23:18
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.

2 participants