There are many places where ByteString.CopyFrom is called which adds overhead/GC pressure, particularly with larger state objects.
Many of these could safely use UnsafeByteOperations.UnsafeWrap to avoid the copy.
Context:
If this is agreeable, I would be happy to provide a PR.
Release Note
RELEASE NOTE: FIX Reduce unnecessary buffer copies in state operations