Currently, any time encoding is recursed into (such as when encoding map keys and values), typeinfo analysis is re-run. There should be an unexported internal-use dec and enc function that Dec and Enc call into but allow giving the typeInfo so reflect doesn't need to be called again since it already was initially. When this issue is resolved, all internal calls to Dec and Enc should be replaced with internal-use ones wherever the typeInfo for the encoded/decoded element is already known.
Currently, any time encoding is recursed into (such as when encoding map keys and values), typeinfo analysis is re-run. There should be an unexported internal-use
dec
andenc
function thatDec
andEnc
call into but allow giving thetypeInfo
so reflect doesn't need to be called again since it already was initially. When this issue is resolved, all internal calls to Dec and Enc should be replaced with internal-use ones wherever the typeInfo for the encoded/decoded element is already known.