Skip to content
Snippets Groups Projects
Forked from Glasgow Haskell Compiler / GHC
Source project has a limited visibility.
  • Hannes Siebenhandl's avatar
    c8ece0df
    Migrate `Finder` component to `OsPath`, fixed #24616 · c8ece0df
    Hannes Siebenhandl authored and Marge Bot's avatar Marge Bot committed
    For each module in a GHCi session, we keep alive one `ModLocation`.
    A `ModLocation` is fairly inefficiently packed, as `String`s are
    expensive in memory usage.
    
    While benchmarking the agda codebase, we concluded that we keep alive
    around 11MB of `FilePath`'s, solely retained by `ModLocation`.
    
    We provide a more densely packed encoding of `ModLocation`, by moving
    from `FilePath` to `OsPath`. Further, we migrate the full `Finder`
    component to `OsPath` to avoid unnecessary transformations.
    As the `Finder` component is well-encapsulated, this requires only a
    minimal amount of changes in other modules.
    
    We introduce pattern synonym for 'ModLocation' which maintains backwards
    compatibility and avoids breaking consumers of 'ModLocation'.
    c8ece0df
    History
    Migrate `Finder` component to `OsPath`, fixed #24616
    Hannes Siebenhandl authored and Marge Bot's avatar Marge Bot committed
    For each module in a GHCi session, we keep alive one `ModLocation`.
    A `ModLocation` is fairly inefficiently packed, as `String`s are
    expensive in memory usage.
    
    While benchmarking the agda codebase, we concluded that we keep alive
    around 11MB of `FilePath`'s, solely retained by `ModLocation`.
    
    We provide a more densely packed encoding of `ModLocation`, by moving
    from `FilePath` to `OsPath`. Further, we migrate the full `Finder`
    component to `OsPath` to avoid unnecessary transformations.
    As the `Finder` component is well-encapsulated, this requires only a
    minimal amount of changes in other modules.
    
    We introduce pattern synonym for 'ModLocation' which maintains backwards
    compatibility and avoids breaking consumers of 'ModLocation'.
Code owners
Assign users and groups as approvers for specific file changes. Learn more.