Note hashes deserialization occurs only when it is necessary.
There are still a lot of allocations in try_from_slice and rayon but it isn't something that could be easily fixed. There is some PR: https://github.com/near/borsh-rs/pull/115 that tries to implement heapless deserialization but it's not ready yet.
This PR tries to reduce the number of runtime memory allocations during state syncing. The following was done:
There are still a lot of allocations in try_from_slice and rayon but it isn't something that could be easily fixed. There is some PR: https://github.com/near/borsh-rs/pull/115 that tries to implement heapless deserialization but it's not ready yet.