Ref.Synchronized#modifyZIO was called for every message which is not very good for performance considering it uses a semaphone. We moved the last usage time of each entity into a separate Ref, and always use get before modifyZIO so that the happy path is fast.
Ref.Synchronized#modifyZIO
was called for every message which is not very good for performance considering it uses a semaphone. We moved the last usage time of each entity into a separateRef
, and always useget
beforemodifyZIO
so that the happy path is fast.