Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Question: can we move away from flyweight pattern? #366

Copy link
Copy link
@yschimke

Description

@yschimke
Issue body actions

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.

Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.