iOS hangs when selecting many photos for EXIF scanning #1
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Bug
Selecting 50+ photos from iOS Photos app causes the tab to hang/freeze completely.
Root Cause
FileReader.readAsDataURL()inscanPhoto()reads the entire file into memory as a base64 string. A typical iPhone photo is 3-12 MB, producing ~7 MB data URLs. With 50 photos that is 350+ MB of strings in memory — exceeding iOS Safari per-tab memory limit.Fix
readAsDataURLwithURL.createObjectURL(file)— zero-copy, no memory bloat.URL.revokeObjectURL()on reset — prevents blob URL leaks.Files changed
static/index.html: scanPhoto, batch size, resetAll cleanupserver.py: HEIC/HEIF support (unrelated, included in commit)