Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reduce the size of type information in durable coroutine state (#114)
Now that we can inspect durable coroutine state (#113), a few optimizations are clear. Firstly, package names are currently duplicated across types. This PR updates the serialization layer to intern strings so that there's no duplication. Secondly, the serialization layer currently stores type information for _all_ referenced types (recursively). When custom serializers are registered this type information is not used; we just need a reference to the custom serialization routines. An offline process analyzing the state doesn't need this information either, because the custom serializer might emit entirely different objects/types. Since #112, type information is available for the _output_ of custom serializers, so the input type info isn't necessary. This PR updates the serialization layer to no longer store type information for types with custom serializers. All that's stored now is the interned package name and type name, along with the `custom` flag which indicate that the type is opaque. When stacked with #104, the reduction in the size of type information can be drastic.
- Loading branch information