bee-dashboard
bee-dashboard copied to clipboard
Optimise local storage usage to avoid deserialisation all the time
I'd suggest to just always serialize the history you have live in app and overwrite the localstorage history key. I don't see a reason why this should always try retrieve the full history, deserialize it, find a record that may need to be replaced, serialize it and save it.
Originally posted by @vojtechsimetka in https://github.com/ethersphere/bee-dashboard/pull/260#discussion_r763674310
Originally it was done on purpose since the local storage operations are often called without having the state in a deserialised object form, but maybe having it extracted to a provider is a better way to approach this.