reuvenlax commented on pull request #13802: URL: https://github.com/apache/beam/pull/13802#issuecomment-767028246
Added this optimization On Mon, Jan 25, 2021 at 10:19 AM Steven Niemitz <[email protected]> wrote: > 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. > > — > You are receiving this because you authored the thread. > Reply to this email directly, view it on GitHub > <https://github.com/apache/beam/pull/13802#issuecomment-767015114>, or > unsubscribe > <https://github.com/notifications/unsubscribe-auth/AFAYJVLJLRO4NLHYC7GHOL3S3WY2VANCNFSM4WP3BTDA> > . > ---------------------------------------------------------------- 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]
