aboutsummaryrefslogtreecommitdiffstats
path: root/packages/meshbay-hub/src/meshbay_hub
diff options
context:
space:
mode:
authorChristophe Besson <cbesson@gmail.com>2026-09-16 17:51:19 +0200
committerChristophe Besson <cbesson@gmail.com>2026-09-16 17:51:19 +0200
commit929bfcccf8928a30d86d48a8b0137db0dd4a1ee0 (patch)
treea22966059d22cccd60238752406f98a58304ec16 /packages/meshbay-hub/src/meshbay_hub
parentc35f3a73eb68cdd7c4179cded3d1ead63ec5a033 (diff)
downloadmeshbay-929bfcccf8928a30d86d48a8b0137db0dd4a1ee0.tar.gz
playlists: promise the count that holds when nothing compresses
The ceiling is 1200 tracks on a library that repeats and 660 on one that never does; the message said 1000, which would send a reader back into the wall at 660. It says 500, measured at both ends. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Diffstat (limited to 'packages/meshbay-hub/src/meshbay_hub')
-rw-r--r--packages/meshbay-hub/src/meshbay_hub/static/playlist-menu.js2
-rw-r--r--packages/meshbay-hub/src/meshbay_hub/static/playlists.js11
2 files changed, 9 insertions, 4 deletions
diff --git a/packages/meshbay-hub/src/meshbay_hub/static/playlist-menu.js b/packages/meshbay-hub/src/meshbay_hub/static/playlist-menu.js
index 70c105d..64d1c62 100644
--- a/packages/meshbay-hub/src/meshbay_hub/static/playlist-menu.js
+++ b/packages/meshbay-hub/src/meshbay_hub/static/playlist-menu.js
@@ -203,7 +203,7 @@ function PlaylistMenuButton({ userId, lists, reload, onPlayQueue, onSync, cached
// the lie this whole report exists to stop.
const big = (r && r.tooLarge) || [];
say(big.length
- ? t('playlists.err_too_large', { name: big[0], n: 1000 })
+ ? t('playlists.err_too_large', { name: big[0], n: 500 })
: (r && r.ok
? `${t('playlists.synced')} (${r.pushed || 0}↑ ${r.pulled || 0}↓)`
: (why === 'no_key'
diff --git a/packages/meshbay-hub/src/meshbay_hub/static/playlists.js b/packages/meshbay-hub/src/meshbay_hub/static/playlists.js
index af359f3..bac9b3d 100644
--- a/packages/meshbay-hub/src/meshbay_hub/static/playlists.js
+++ b/packages/meshbay-hub/src/meshbay_hub/static/playlists.js
@@ -41,9 +41,14 @@ import {
*
* 62 KB leaves room for the frame around the bytes — the four-byte length
* prefix and the msgpack map that carries the kind, the revision and a request
- * id. Measured, a thousand tracks seal to 53 276 bytes and each further track
- * costs about 50, so the ceiling is near **1200 tracks in one playlist**
- * (`test_playlist_store.py`, which fails if that stops being true).
+ * id.
+ *
+ * How many tracks that is depends entirely on how much the metadata repeats,
+ * because repetition is all deflate has to work with. Measured both ways: a
+ * library where artists and albums recur costs ~50 bytes a track and tops out
+ * near **1200**; one with no repetition at all costs ~91 and tops out near
+ * **660**. The sentence shown to a reader says 500, which holds in both worlds
+ * — `test_playlist_store.py` fails if it stops holding in the harsher one.
*
* Checked *after* sealing rather than estimated before it: compression makes
* the length of a playlist a poor guide to the length of its blob, and a guess