Part of #352
objectPath is the main bottleneck when serializing view or events. It's called very often. There are two factors that make it slow: the call to .rest and String.split. This PR avoids calling .rest by passing the path array alongside the index in nested calls. The split still there to, maybe, be handled later
knownType is also called a lot. This PR make its initialization explicit instead of by demand and reduce the number of calls to it.
Part of #352 objectPath is the main bottleneck when serializing view or events. It's called very often. There are two factors that make it slow: the call to .rest and String.split. This PR avoids calling .rest by passing the path array alongside the index in nested calls. The split still there to, maybe, be handled later
knownType is also called a lot. This PR make its initialization explicit instead of by demand and reduce the number of calls to it.