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

[BEAM-3388] Type-specialize custom decoders and encoders in Go SDK runtime #4323

Closed
wants to merge 1 commit into from

Conversation

herohde
Copy link
Contributor

@herohde herohde commented Dec 22, 2017

Removes the reflective overhead for custom encoders and decoders of certain types. This is a "poor man's templates" approach.

Once #4289 is in, I'll change the element coding to not reinspect the coder structure for each element. That will both speed things up and avoid memory reallocations.

@herohde
Copy link
Contributor Author

herohde commented Dec 22, 2017

R: @wcn3


// RegisterDecoder registers an custom decoder invoker for the given type,
// such as "func(int)[]byte". If multiple decoder invokers are registered
// for the same type, the last registration wins.
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we at least log a warning we're clobbering a registration? That would help a user in the case where they aren't getting the coder behavior they expect. Bonus points if we retain the filename and line of code that performed the registration.

@herohde
Copy link
Contributor Author

herohde commented Jan 2, 2018

Ups. Accidentally messed up this branch. I'll resend the PR and address the comment.

@herohde herohde closed this Jan 2, 2018
@herohde herohde deleted the runtime3 branch January 2, 2018 20:40
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.

None yet

2 participants