Based on what I believe was a misunderstanding of how the ASN.1 library works, the decoder was creating a new Ber.Reader for every sequence tag. This is not necessary when the decoder is reading linearly from start to finish. I have removed the ExtendedReader.getSequence() method and replaced this with the intended use of ASN.1 via readSequence() and reader.length.
For large structures, this may improve performance because it significantly reduces the number of objects created and the amount of garbage that needs to be collected.
Based on what I believe was a misunderstanding of how the ASN.1 library works, the decoder was creating a new Ber.Reader for every sequence tag. This is not necessary when the decoder is reading linearly from start to finish. I have removed the
ExtendedReader.getSequence()
method and replaced this with the intended use of ASN.1 viareadSequence()
andreader.length
.For large structures, this may improve performance because it significantly reduces the number of objects created and the amount of garbage that needs to be collected.