-
Notifications
You must be signed in to change notification settings - Fork 354
Description
My contention, if we move away from the single concrete implementation of Frame, and various flyweights e.g. ErrorFrameFlyweight. We could have extremely light implementations of Frame subtypes like ErrorFrame that would just wrap a ByteBuf, which was then recycled. The cost of any particular Frame instance (ignoring the ByteBuf) is roughly equivalent to any one of the million of temporary objects we create with all the syntactic sugar that happens in reactor operations.
We don't get much from Frame being recycleable, since the main cost if the ByteBuf within.
By moving to a more idiomatic model with Frame subtypes, we would get type safety and a more discoverable API for ourselves. n.b. these are generally internal so mostly I don't think this affects a user of the ReactiveSocket API.