diff options
| author | Adam Soltys <[email protected]> | 2026-10-07 08:19:24 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2026-10-07 08:19:24 -0700 |
| commit | 7067ed8024cf8d4694fe260df90897c5ebecb245 (patch) | |
| tree | e427d2d59a22c4ed6dc2bc4d1167e038658e8c12 /src | |
| parent | 78cf670939133fc4f656f0f42b21a59431a53842 (diff) | |
| download | coinosv3-7067ed8024cf8d4694fe260df90897c5ebecb245.tar.gz coinosv3-7067ed8024cf8d4694fe260df90897c5ebecb245.zip | |
Profile cache: room for ~350 face thumbnails and 1500 rows now that it lives in IndexedDB
The 320K thumbnail budget was sized for localStorage; on a phone that
follows hundreds it kept ~34 faces and the rest churned (thumbnail made,
evicted, original downloaded again).
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Diffstat (limited to 'src')
| -rw-r--r-- | src/features/messages.js | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/features/messages.js b/src/features/messages.js index f98df3a..00404a2 100644 --- a/src/features/messages.js +++ b/src/features/messages.js @@ -675,7 +675,7 @@ export function messagesFeature(ctx) { // landing during a scroll used to parse and re-serialize the whole blob // thirty times over, on the main thread, mid-scroll. let profBlob = null, profFlush = null; - const PROFILE_ROWS = 300; // a row without a thumbnail is ~430 chars + const PROFILE_ROWS = 1500; // a row without a thumbnail is ~430 chars; IndexedDB has room const profilesDisk = () => (profBlob ||= wallet.loadFeatureState('profiles', {})); function flushProfiles() { profFlush = null; @@ -799,7 +799,11 @@ export function messagesFeature(ctx) { // blob carries each profile's bio and banner as well now — a couple of // hundred bytes each, and the reason a profile page paints on the first // tap — so the ceiling is raised to keep the same number of faces. - const THUMB_BUDGET = 320_000; + // Since the blob moved to IndexedDB (cache-store.js) the ceiling is no + // longer localStorage's five million characters shared with everything: + // 320K held thirty-odd faces on a phone that follows hundreds, and the + // rest churned — thumbnail made, evicted, the original fetched again. + const THUMB_BUDGET = 2_000_000; const THUMB_SLOW = 20_000; // a host that won't answer must not hold a slot const THUMB_RETRY = 6 * 3600_000; // ...and must not be written off for good const THUMB_RETRY_MAX = 14 * 24 * 3600_000; // a host that never works, backed off |
