-
Notifications
You must be signed in to change notification settings - Fork 99
Closed
Labels
Description
- After Normalize file paths before converting to Uri's #205 normalization could happen up to 2 times: in
filePathToUriandtoNormalizeUri, the last one to ensure that fileNormalizedUri's from other sources (like Aeson) are always normalized (and fix a bug in hie) - Moreover, if client code already has ensured that filepaths are normalized it suffer the penalty of two additional normalizations:
- It happened in ghcid: Fix performance regression introduced by filepath normalisation ghcide#303 with a notable perfomance degradation (it is called many times)
- So it was neccesary to inline the code of
filePathToUrito avoid the extra normalization
- To avoid this,
filePathToUrishould remove the normalization, moving it tonormalizeUriand maybe to another functionfilePathToNormalizedUri :: FilePath -> NormalizedUri