steveniemitz commented on pull request #13802:
URL: https://github.com/apache/beam/pull/13802#issuecomment-767015114


   > Maybe. Requires a bit of thought, because the naive approach would force 
us to serialize the key and value on every write to cheeck for equality, and 
that could add quite a bit of CPU and memory cost.
   
   Maybe we could special case for just primitive values?  That'd get you the 
optimization for SetState, which I'd guess is going to be like 99% of the cases 
where you'd be adding the same value for a key repeatedly to the map.  We're 
already serializing the key/value each commit anyways, so there wouldn't be any 
overhead there.


----------------------------------------------------------------
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]


Reply via email to