Skip to content

Comments

<framer> optimization readHeader(...)#428

Closed
illia-li wants to merge 1 commit intoscylladb:masterfrom
illia-li:il/fix/framer/read_header
Closed

<framer> optimization readHeader(...)#428
illia-li wants to merge 1 commit intoscylladb:masterfrom
illia-li:il/fix/framer/read_header

Conversation

@illia-li
Copy link

Makes different functions for different protocol versions

Makes different functions for different protocol versions
@dkropachev
Copy link
Collaborator

Don't worth it.

@dkropachev dkropachev closed this Apr 13, 2025
@illia-li illia-li deleted the il/fix/framer/read_header branch April 13, 2025 20:00
if err != nil {
return frameHeader{}, err
func readHeader(connProto byte, r io.Reader, p []byte) (head frameHeader, err error) {
if connProto == 2 {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why even support v2?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are people who find it very difficult to let go of something old, and there are also people who help them with this.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's OK - but those people can (and maybe should!) stay with older drivers as well, as this is not a tested code path, most likely.

@mykaul
Copy link

mykaul commented Apr 14, 2025

@illia-li - perhaps those should be either measured and/or shown to reduce code size/bloat?
Perhaps send them upstream as well for feedback?

@illia-li
Copy link
Author

Perhaps send them upstream as well for feedback?

That's a great suggestion. I'll do that

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants