youngoli commented on issue #11257: [BEAM-9642] Create runtime invokers for SDF 
methods.
URL: https://github.com/apache/beam/pull/11257#issuecomment-606366621
 
 
   R: @lostluck 
   
   Ready for an actual review. It should be much more optimized now. I have a 
call function so the code won't repeatedly hit the switch statements, and I 
have a cache for input elements (which is skipped altogether if the user 
generated code anyway).
   
   I did consider ways I could use the existing invoker code, but there were so 
many places that assumed a normal DoFn was being used that it would be very 
difficult to use it without doing a good amount of refactoring. I think if the 
regular DoFn methods and the SDF methods ever get a standardized format for 
their signatures that covers both of them, then we can easily combine it, but 
until then I think this is preferable.
   
   Only other part I was debating was whether it was worth trying to find a way 
to have one single sdfInvoker instead of a separate invoker for each method. 
Ultimately I felt like it was a lot of extra work to avoid a little bit of 
duplication (only the Invoke and Reset methods could be deduplicated, the 
initCallFn methods would still be 4 different methods).

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to