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

performance degradation after upgrade to haskell-lsp 0.19 #1007

Closed
pepeiborra opened this issue Dec 31, 2019 · 4 comments · Fixed by haskell/ghcide#303
Closed

performance degradation after upgrade to haskell-lsp 0.19 #1007

pepeiborra opened this issue Dec 31, 2019 · 4 comments · Fixed by haskell/ghcide#303
Assignees

Comments

@pepeiborra
Copy link
Collaborator

I've noticed a hover performance degradation in head, and bisected it to this change. Hover takes twice as long for me.

Originally posted by @pepeiborra in haskell/ghcide#254 (comment)

@cocreature
Copy link
Contributor

In a lot of cases, hover is bottlenecked on checking if files have changed see haskell/ghcide#101. IIRC the latest haskell-lsp release has changed how the VFS is accessed (iirc it now goes via STM) so my guess would be that this is what is causing the slowdown but it would be good to bisect through the haskell-lsp changes to verify that.

@pepeiborra
Copy link
Collaborator Author

pepeiborra commented Jan 3, 2020

@cocreature have you seen my Shake profiles in the original comment? GetFileExists rules take 18s for a hover where they used to take 4s.

@cocreature
Copy link
Contributor

Ah I missed those, thanks for pointing that out. That seems to confirm my suspicion that VFS lookups got slower.

@pepeiborra
Copy link
Collaborator Author

pepeiborra commented Jan 3, 2020

Bad hover performance is a major problem for lsp-emacs, which seems to send a hover request for every character typed, and then on a timer even when not typing. VSCode does not do this. Is it worth trying to fix haskell/ghcide#101 before releasing a version with haskell-lsp 0.19?

@cocreature cocreature self-assigned this Jan 3, 2020
cocreature referenced this issue in haskell/ghcide Jan 3, 2020
We already normalise filepaths in NormalizedFilePath. haskell-lsp
changed things such that the conversion from Uri to NormalizedUri
normalises the filepath again which caused a significant slowdown in
GetFileExists.

We already have a wrapper for converting from NormalizedFilePath to
NormalizedUri so this PR changes this wrapper to inline the definition
without the additional layer of normalisation.

fixes #298
cocreature referenced this issue in haskell/ghcide Jan 3, 2020
We already normalise filepaths in NormalizedFilePath. haskell-lsp
changed things such that the conversion from Uri to NormalizedUri
normalises the filepath again which caused a significant slowdown in
GetFileExists.

We already have a wrapper for converting from NormalizedFilePath to
NormalizedUri so this PR changes this wrapper to inline the definition
without the additional layer of normalisation.

fixes #298
pepeiborra referenced this issue in pepeiborra/ghcide Jan 3, 2020
…ell#303)

We already normalise filepaths in NormalizedFilePath. haskell-lsp
changed things such that the conversion from Uri to NormalizedUri
normalises the filepath again which caused a significant slowdown in
GetFileExists.

We already have a wrapper for converting from NormalizedFilePath to
NormalizedUri so this PR changes this wrapper to inline the definition
without the additional layer of normalisation.

fixes #298
pepeiborra referenced this issue in pepeiborra/ghcide Feb 1, 2020
…ell#303)

We already normalise filepaths in NormalizedFilePath. haskell-lsp
changed things such that the conversion from Uri to NormalizedUri
normalises the filepath again which caused a significant slowdown in
GetFileExists.

We already have a wrapper for converting from NormalizedFilePath to
NormalizedUri so this PR changes this wrapper to inline the definition
without the additional layer of normalisation.

fixes #298
pepeiborra referenced this issue in pepeiborra/ide Dec 29, 2020
…ell/ghcide#303)

We already normalise filepaths in NormalizedFilePath. haskell-lsp
changed things such that the conversion from Uri to NormalizedUri
normalises the filepath again which caused a significant slowdown in
GetFileExists.

We already have a wrapper for converting from NormalizedFilePath to
NormalizedUri so this PR changes this wrapper to inline the definition
without the additional layer of normalisation.

fixes haskell/ghcide#298
pepeiborra referenced this issue in pepeiborra/ide Dec 29, 2020
…ell/ghcide#303)

We already normalise filepaths in NormalizedFilePath. haskell-lsp
changed things such that the conversion from Uri to NormalizedUri
normalises the filepath again which caused a significant slowdown in
GetFileExists.

We already have a wrapper for converting from NormalizedFilePath to
NormalizedUri so this PR changes this wrapper to inline the definition
without the additional layer of normalisation.

fixes haskell/ghcide#298
pepeiborra referenced this issue in pepeiborra/ide Dec 29, 2020
…ell/ghcide#303)

We already normalise filepaths in NormalizedFilePath. haskell-lsp
changed things such that the conversion from Uri to NormalizedUri
normalises the filepath again which caused a significant slowdown in
GetFileExists.

We already have a wrapper for converting from NormalizedFilePath to
NormalizedUri so this PR changes this wrapper to inline the definition
without the additional layer of normalisation.

fixes haskell/ghcide#298
@pepeiborra pepeiborra transferred this issue from haskell/ghcide Jan 1, 2021
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 a pull request may close this issue.

2 participants