Closed sugmanue closed 2 weeks ago
Failed conditions
50.1% Coverage on New Code (required ≥ 80%)
C Reliability Rating on New Code (required ≥ A)
See analysis details on SonarCloud
Catch issues before they fail your Quality Gate with our IDE extension SonarLint
Motivation and Context
Adds some performance improvements changes to improve the RPCv2 protocol, including:
Allow reading numbers without parsing
CBOR encodes numbers that are faster to read from its encoded form than converting them to strings and then parsing them back. For that we changed 1) the way we parse to return embedded objects when appropriate, and, 2) the way we unmarshall to support numbers as embedded objects, we also changed the way
Instant
is unmarshalled as inCBOR
that's done as a number.Faster lookups for unmarshallers
We keep a map in
AbstractMarshallingRegistry
to register different. This map is used heavily during unmarshalling to find which unmarshall to use for each value.
to store, keyed on
MarshallngType
, to register unmarshallers for different types, however the types that we care about are static and known at compile time, this allow us to make an optimization, add an enum key to each of the knownMarshallngType
that we care about and index those using this enum to useEnumMap
that has better performance than regular maps, and, fallback to use a regular map for the marshalling types that are not know.Modifications
to find the unmarshaller for the given type, and, on
Trait.class
to find traits stored in theSdkField
instances. To improve the performance of both we rely on the fact that both classes have a known set of static values that we care about,Testing
Screenshots (if appropriate)
Types of changes
Checklist
mvn install
succeedsscripts/new-change
script and following the instructions. Commit the new file created by the script in.changes/next-release
with your changes.License