haskell-tls / hs-certificate

Certificate and Key Reader/Writer in haskell
60 stars 57 forks source link

Certificate store is not compactable #122

Open ethercrow opened 3 years ago

ethercrow commented 3 years ago

For applications using http-client the usual mode of operation is to load a certificate store at startup and keep it for the lifetime of the program. It seems like a use case for GHC's compact regions. When you have many certificates and several network managers in your system, the overhead of GC having to traverse these several copies of the store is allegedly non-trivial.

However, if I try to compact a store it fails with compaction failed: cannot compact pinned objects.

What do you think about the idea of making certificate store compactable?