Files
bitvid/js
google-labs-jules[bot]andPR0M3TH3AN 75b6bbd1e6 perf: implement IndexedDB connection pooling in dmDb.js
Refactor `js/storage/dmDb.js` to use a singleton connection pattern for IndexedDB.
Previously, the database was opened and closed for every single operation,
leading to significant overhead.

Changes:
- Introduced `dbInstance` and `dbPromise` to cache the database connection.
- Refactored `openDmDb` to reuse the existing connection or pending promise.
- Added `onversionchange` handler to safely close the connection if an upgrade is requested.
- Removed all manual `db.close()` calls from exported functions.
- Added a benchmark script in `tests/benchmark-dm-db.mjs` to verify the improvement.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-08 03:09:14 +00:00
..
2026-01-24 20:00:00 -05:00
2026-01-23 02:09:08 -05:00
2026-01-26 21:49:18 -05:00
2026-01-26 21:49:18 -05:00
2026-01-27 08:36:12 -05:00