I have an input that is initially hidden on page load. Given that I am hoping for 10K+ users, I am trying to optimize for speed. The question is: Is it better to (1) set the default value to a value in the database or (2) to load the value in the database into a custom state on page load and then set the hidden input’s value to be the same as the custom state?
Although (1) seems more straightforward, I am wondering when the value is loaded into the input in that scenario. If it is when the input becomes visible, it’ll take some time to fetch the data. I’d rather all the fetching/searching happen on page load.
Advice is appreciated!