fix(serialization): cap codec allocations (#10340)