RobustToolbox icon indicating copy to clipboard operation
RobustToolbox copied to clipboard

Custom type serializers should have some way of directly accessing IPrototypeManager & IReflectionManager instances.

Open ElectroJr opened this issue 3 years ago • 0 comments
trafficstars

Currently custom type serializers should resolve these using the dependency collection, but this can noticeably slow down entity spawning. Ideally there'd be some way to just have the serialization manager resolve these from the collection and pass them to the serializers. Some examples where this would be useful include the SpriteSpecifierSerializer and AppearanceKeySerializer.

Also, the writing functions don't even get the dependency collection passed in, so these currently can't even use that to resolve these managers. This was a problem for #2973, where the AppearanceKeySerializer currently just directly uses the serialization manager's IReflectionManager.

ElectroJr avatar Jul 07 '22 21:07 ElectroJr