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

chore(lsp): improve goto performance by caching ast #3942

Closed
Tracked by #1574
kobyhallx opened this issue Jan 4, 2024 · 0 comments
Closed
Tracked by #1574

chore(lsp): improve goto performance by caching ast #3942

kobyhallx opened this issue Jan 4, 2024 · 0 comments

Comments

@kobyhallx
Copy link
Contributor

kobyhallx commented Jan 4, 2024

Goto Definitions still take take too much time to execute leaving user with undesirable experience. On a bigger workspace (beyond simple test cases, eg. noir-protocol-circuits) it can take as much as a second or more to perform goto request.

@github-project-automation github-project-automation bot moved this to 📋 Backlog in Noir Jan 4, 2024
github-merge-queue bot pushed a commit that referenced this issue Jan 4, 2024
# Description

## Problem\*

Goto Definitions still take take too much time to execute leaving user
with undesirable experience. On a bigger workspace (beyond simple test
cases, eg.
[noir-protocol-circuits](https://github.com/AztecProtocol/aztec-packages/tree/master/yarn-project/noir-protocol-circuits))
it can take as much as a second or more to perform goto request.

Resolves chore(lsp): improve goto performance by caching ast #3942

## Summary\*

Improvement from `~1s` down to `~11ms` on example project
[noir-protocol-circuits](https://github.com/AztecProtocol/aztec-packages/tree/master/yarn-project/noir-protocol-circuits)
is achieved by caching definitions resolved during file save or file
open.

The cost for this optimisation is when user opens noir source file, at
which point parsing and resolving is done. This however is not
noticeable for user as source code can be seen and operated on.

## Additional Context



## Documentation\*

Check one:
- [x] No documentation needed.
- [ ] Documentation included in this PR.
- [ ] **[Exceptional Case]** Documentation to be submitted in a separate
PR.

# PR Checklist\*

- [x] I have tested the changes locally.
- [x] I have formatted the changes with [Prettier](https://prettier.io/)
and/or `cargo fmt` on default settings.
@github-project-automation github-project-automation bot moved this from 📋 Backlog to ✅ Done in Noir Jan 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

No branches or pull requests

1 participant