Skip to content

Performance: IndexedDB refactor#22

Merged
hgosalia merged 1 commit into
mainfrom
perf/indexeddb-refactor
May 29, 2026
Merged

Performance: IndexedDB refactor#22
hgosalia merged 1 commit into
mainfrom
perf/indexeddb-refactor

Conversation

@hgosalia
Copy link
Copy Markdown
Member

No description provided.

@github-actions
Copy link
Copy Markdown

📋 PR Summary

Title: Performance: IndexedDB refactor
Author: @hgosalia
Draft: No
2 files changed: +77 additions, -8 deletions

Description

This PR refactors the IndexedDB implementation to improve performance by storing file paths instead of base64-encoded images. The exportData function now filters out empty photo entries and ensures that data URLs are file paths, which reduces memory usage and avoids "Invalid string length" errors for large datasets. In the processFiles function, the code saves full-size images to disk and verifies their accessibility before replacing base64 data URLs with file paths in IndexedDB, significantly reducing the size of stored data. Overall, these changes enhance the application's efficiency and responsiveness when handling photo data.

Files

  • js/data.js — New: _migrateImagesToDisk. Modified: exportData, init, _migrateThumbsToWebP
  • js/media.js — Modified: processFiles

@hgosalia hgosalia merged commit 1c3f9c9 into main May 29, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant