HomePhabricator

Use fixed preallocation instead of costly GetSerializeSize

Description

Use fixed preallocation instead of costly GetSerializeSize

Dbwrapper used GetSerializeSize() to compute the size of the buffer
to preallocate. For some cases (specifically: CCoins) this requires
a costly compression call. Avoid this by just using fixed size
preallocations instead.

Details

Provenance
Pieter Wuille <pieter.wuille@gmail.com>Authored on Oct 29 2016, 02:12
deadalnixPushed on May 14 2017, 22:04
Parents
rABC25a211aa9edf: Add optimized CSizeComputer serializers
Branches
Unknown
Tags
Unknown

Event Timeline

Pieter Wuille <pieter.wuille@gmail.com> committed rABCd59a518466f6: Use fixed preallocation instead of costly GetSerializeSize (authored by Pieter Wuille <pieter.wuille@gmail.com>).Nov 7 2016, 21:56