Store histories and the tile index in SQLite

Message, channel and route histories move from whole-blob preferences to
indexed SQLite rows on native platforms, so chats page from storage instead
of loading a full conversation. Web keeps the preferences store. Existing
histories are imported once on the first launch.

Linux and Windows keep the map tile index in SQLite and import the old JSON
index on first use.

Unreadable legacy data no longer blocks saves, migrations or startup: it is
left in place and skipped. If the database cannot be opened, the run keeps
histories in preferences and the next launch merges them in.

Also adds a performance profiling reference and a script that clears the
Dart HTTP profile.
This commit is contained in:
zjs81 committed 2026-11-09 22:32:40 -07:00
1 parent 0106569e7d
commit 2d56d5e349
47 files changed
+4465 -614

No files matched your search

+9
View File
@@ -184,6 +184,15 @@ A full-screen map with a draggable bottom sheet containing:
## Offline Map Cache
Linux and Windows keep the tile index in SQLite, so opening a large offline map
does not load every tile's metadata into memory. Existing JSON indexes migrate
automatically on first use; downloaded tile files and the cache limit are
preserved. The old index is removed only after its replacement is committed.
Unreadable records are skipped, and an index that contained any is kept beside
the database with an `.unreadable` suffix instead of being deleted.
The database and import marker are versioned, so a completed migration is not
repeated and an older app does not downgrade a newer database.
### How to Access
Settings → App Settings → Map Display → Offline Map Cache