You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We should be loading files lazily. That is, not until the file has been opened and the editor focussed. In logs attached to #3289, it appears that we might be recursively parsing every .ps1 file, which would cause a large performance penalty. As a relatively new maintainer I am not sure how we do this, and would like to thoroughly investigate.
The text was updated successfully, but these errors were encountered:
For what it's worth, it definitely looks like we examine every .ps1 file because otherwise I don't know how PSES is finding symbols defined in other files 🙃
Closing this. I spent some time in the code lens files and yes, we explicitly load referenced files when resolving the "references" code lens because that is the only way to determine how many references in the workspace are made to each symbol. This is similar to many other projects, and the constraint is that it happens to files in the workspace. For most use cases, this is totally fine and expected, but obviously performance will suffer if someone opens e.g. a top-level src folder as a workspace, indicating to the extension that it should parse every PowerShell file in all their repos.
We should be loading files lazily. That is, not until the file has been opened and the editor focussed. In logs attached to #3289, it appears that we might be recursively parsing every
.ps1
file, which would cause a large performance penalty. As a relatively new maintainer I am not sure how we do this, and would like to thoroughly investigate.The text was updated successfully, but these errors were encountered: