Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Concatenate.Strategy.Prepend should maybe be removed #863

Open
Jake-Shadle opened this issue Nov 21, 2023 · 1 comment
Open

Concatenate.Strategy.Prepend should maybe be removed #863

Jake-Shadle opened this issue Nov 21, 2023 · 1 comment
Labels
kind/bug Something isn't working

Comments

@Jake-Shadle
Copy link
Collaborator

All of the tests and examples (and current usage at Embark) only uses the Append strategy, which is very easy and efficient since it's just an append to a heap buffer, however the Prepend strategy is not, as it must shift the entire packet contents first. Not sure if anyone uses this, but it seems as if Append is strictly better, so Prepend should either be removed, or at least come with a warning that using it will be less efficient.

@Jake-Shadle Jake-Shadle added the kind/bug Something isn't working label Nov 21, 2023
@markmandel
Copy link
Member

or at least come with a warning that using it will be less efficient.

I'd be inclined towards this approach. Someone will have some kind of legacy packet / constraint that requires prepend - so I figure there's no point in removing the feature.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants