aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/features/messages.js8
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