damccorm commented on code in PR #17429: URL: https://github.com/apache/beam/pull/17429#discussion_r863934043
########## sdks/go/pkg/beam/registration/registration.tmpl: ########## @@ -0,0 +1,252 @@ +{{define "BuildWrapper_StartFinishBundle"}} +{{$lowerName := "unknown"}}{{$upperName := "unknown"}}{{if (eq .func "startBundle")}}{{$lowerName = "startBundle"}}{{$upperName = "StartBundle"}}{{end}}{{if (eq .func "finishBundle")}}{{$lowerName = "finishBundle"}}{{$upperName = "FinishBundle"}}{{end}}{{$startFinishBundleMaxIn := .startFinishBundleMaxIn}}{{$processElementMaxIn := .processElementMaxIn}} +{{range $numParams := upto $processElementMaxIn}} +func build{{$upperName}}Wrapper{{$numParams}}{{(genericTypingRepresentation $numParams 0 true)}}(doFn interface{}) func(interface{}) reflectx.Func { Review Comment: Yeah, that helps a lot. Technically, this does introduce a little more comparison overhead (so the registration call will be slower), but not nearly as much as I originally thought (read: not a significant amount), and the reduced sdk size is worth it. The extra comparisons were the reason I didn't initially structure it this way. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: github-unsubscr...@beam.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org