skgrush / CavernSeer

An iPadOS and iOS application for scanning 3D spaces
MIT License
32 stars 9 forks source link

Scan caching #27

Closed skgrush closed 3 years ago

skgrush commented 3 years ago

No longer do we read in all the files for caching their metadata. Now cache files are created when scan files are created (or found without a corresponding cache file) and are used for listing purposes, which means we only ever have to open the scan files when we actually need to view a scan!

This is a massive savings on storage-reading as starting up with ~100MB of scan files only requires reading ~2MB, as each cache file is 50-300kB, almost entirely due to the jpeg data (which is compressed beyond what the ScanFile holds)

It might be ideal to create a proper thumbnail image for even more optimal space usage, but for now they're just significantly compressed.

Resolves #26