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

Consider making the references code lens opt-in #3902

Closed
SeeminglyScience opened this issue Apr 1, 2022 · 8 comments
Closed

Consider making the references code lens opt-in #3902

SeeminglyScience opened this issue Apr 1, 2022 · 8 comments
Assignees
Labels
Area-Symbols & References Issue-Enhancement A feature request (enhancement). Issue-Performance Something's slow.

Comments

@SeeminglyScience
Copy link
Collaborator

SeeminglyScience commented Apr 1, 2022

Currently as long as you have code lens on you'll always get the references code lens. This can dramatically slow down very large workspaces.

A large portion of folks (anecdotal speculation) who try out VSCode have an existing workflow of "store all the scripts in this folder". This leads to them opening up their "all of my PowerShell" folder and coming away with the impression that VSCode's intellisense is slower than it otherwise would be.

We should add a new setting that controls this code lens specifically and have the default value be disabled until we can determine a better strategy to handle these workspaces without performance loss.

@SeeminglyScience SeeminglyScience added the Issue-Enhancement A feature request (enhancement). label Apr 1, 2022
@ghost ghost added the Needs: Triage Maintainer attention needed! label Apr 1, 2022
@JustinGrote
Copy link
Collaborator

We would want to make sure "go to reference", etc. would still work on an ad hoc fashion, albeit probably slower on first invocation. An ideal implementation would use file watchers and a cache too.

@SeeminglyScience
Copy link
Collaborator Author

Oof that's a good point. C++ has a UI for when it's searching references that makes it look mildly better than just stuck, we may want to look into how hard that would be.

@ili101
Copy link

ili101 commented Apr 2, 2022

I set "editor.codeLens": false in my setting when working with big PowerShell projects since 2020, this issue have some valuable information #2518 (comment) (@DarkLite1)

@JustinGrote
Copy link
Collaborator

"We could use a combination of file system watchers and caches to possibly increase perf here."
Looks like Tyler is of same thinking as me :)

@SeeminglyScience
Copy link
Collaborator Author

We do kinda do that already, just immediately instead of on demand.

@SydneyhSmith SydneyhSmith added Area-Symbols & References Issue-Performance Something's slow. and removed Needs: Triage Maintainer attention needed! labels Apr 5, 2022
@SydneyhSmith SydneyhSmith moved this to Todo in Sea Biscuit Apr 5, 2022
@SydneyhSmith SydneyhSmith added this to the Consider-vNext milestone Apr 5, 2022
@andyleejordan andyleejordan moved this from Todo to Wishlist in Sea Biscuit Apr 13, 2022
@SydneyhSmith SydneyhSmith moved this from Todo to P0 - Todo in American Pharoah May 3, 2022
@fenhl
Copy link

fenhl commented Jul 22, 2022

I'd like to see this since I find the references annotation distracting but would still like to use Code Lens features from outside this extension (specifically the shortcuts to resolve git merge conflicts).

@andyleejordan
Copy link
Member

Resolved via #4139, #4170, and PowerShell/PowerShellEditorServices#1917.

@ghost
Copy link

ghost commented Oct 28, 2022

Thank you for your comment, but please note that this issue has been closed for over a week. For better visibility, consider opening a new issue with a link to this instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Symbols & References Issue-Enhancement A feature request (enhancement). Issue-Performance Something's slow.
Projects
None yet
Development

No branches or pull requests

6 participants