-
Notifications
You must be signed in to change notification settings - Fork 97
Fix performance regression introduced by filepath normalisation #303
Conversation
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for fixing this.
Unfortunate, that you had to replicate part of the normalization from haskell-lsp.
Sorry for the inconveniences. I added the extra normalization step to ensure the file uris were correct even if they come from the aeson instance. I assumed naively that the performance would not be so worse. |
No worries, these things happen and once #101 is addressed this shouldn’t be a bottleneck anymore. I wonder if it might make sense to move |
…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
I accidentally broke this on Windows in #303 by letting the two conversirons get out of sync.
I accidentally broke this on Windows in #303 by letting the two conversirons get out of sync.
…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
I accidentally broke this on Windows in haskell#303 by letting the two conversirons get out of sync.
…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
I accidentally broke this on Windows in haskell/ghcide#303 by letting the two conversirons get out of sync.
…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
I accidentally broke this on Windows in haskell/ghcide#303 by letting the two conversirons get out of sync.
…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
I accidentally broke this on Windows in haskell/ghcide#303 by letting the two conversirons get out of sync.
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
The corresponding
haskell-lsp
PR that caused the regression was haskell/lsp#205Before
After