That is, it seems that it takes 75M to deserialize - possibly a fault in the cbor library, or possibly a fault in Dhall? Any pointers to what may be going wrong?
This deserializes the cache for pkg-set.dhall, right?
While I could be wrong, 75MB heap honestly doesn’t seem all that big to me. The binary cache file alone is 4.8MB already. Remember that it’s normalized, so it contains a lot of redundancies.
I also noticed the same problem you did, which is that the decoding speed I’m getting is much lower than I’d expect to get. According to benchmarks, the decoding speed is about 10 MB/s, but I expect an efficient binary decoder to be able to reach at least 100 MB/s decoding speed.
There is also the possibility of not storing αβ-normalized forms. One idea I floated was providing a cache option for integrity checks that stores them without normalization and ignores hash mismatches:
In other words, something that reifies within the language what the --cache flag to dhall freeze currently does.