Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: do not call done() in stable_restore()
This change removes the call to decoder.done() in stable_restore(). Rationale: * done() almost always returns an error because the input is likely to contain trailing zero bytes. * Calling done() has no effect on the return value. * The error that done() constructs contains the dump of the whole state, which causes the decoder to allocate huge amounts of memory. All of these allocations are unnecessary because stable_restore() throws away the error right away. Fixes #212.
- Loading branch information