Currently, I am developing a diagnostics application that updates data to IndexedDB every three seconds. The data has a fixed size and anything older than a week is automatically removed, resulting in a maximum of 201600 entries. This simplifies the process of calculating the space requirements for IndexedDB accurately. To prepare for users leaving the browser unattended for extended periods, I want to allocate space in IndexedDB upon site launch.
One potential approach is to store a large object that prompts the user to approve space requirements. However, this method involves storing and deleting this object, which consumes significant time and processing resources. In addition, it would be necessary to verify whether this process has already been conducted to avoid duplication.
Are there alternative solutions that could optimize this process?