I am making a website where the user can select options on an item such as size or colour. However, I am using Backbone and when the model is updated the view is re-rendered and options are reset to default.
To stop this, I have used sessionStorage to load the values back in after it is refreshed. This works as well as I would want but I am worried about performance when there is a large amount of items and data to be read. Would there be a visible delay between values being loaded or is sessionStorage fast enough for this not be a problem?
This jsperf test should reassure you https://jsperf.com/localstorage-vs-objects/47
As you can see, looking up in the sessionStorage (or the localStorage for that matter) is a lot slower that looking up in an object.
But, that said, you can do more than 2,000,000 (on my firefox on my computer) of those operations per second. So don't worry about this your users are never going to feel that latency :)