We traverse whole state each time we want to compute whether we want to enable
any timeouts. It causes measurable performance hit. As it is map and we know
only that there is only limited set of keys that can affect timeouts it is
better to access it directly.
What is the new behavior?
Access only required fields. It also makes that function performance less
dependant on state size.
What kind of change does this PR introduce?
Performance fix
What is the current behavior?
We traverse whole state each time we want to compute whether we want to enable any timeouts. It causes measurable performance hit. As it is map and we know only that there is only limited set of keys that can affect timeouts it is better to access it directly.
What is the new behavior?
Access only required fields. It also makes that function performance less dependant on state size.