How costly is state.dirty(...) on a large struct? #112
-
I have a state variable that holds a list of dictionaries. Each dictionary holds information about tasks that are run on the server, like the status, current progress, logs, etc. I was asking myself, how costly that is on the server, if say I have a list of 100 tasks (probably up to a MB as a JSON file) and have 5 running tasks that each update the progress bar every second. It would probably be smarter to have a separate state variable for the progress updates? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Yes you should separate things. The full "tasks" object tree is sent again. You have the option to dynamically add keys to your state if that can help. |
Beta Was this translation helpful? Give feedback.
Yes you should separate things. The full "tasks" object tree is sent again.
You have the option to dynamically add keys to your state if that can help.