maniator / maniator/verticopolis
[Feature]: [P3] Native Uint8Array.toBase64 for save encoding (feature-detect micro-win)
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 5
- Forks
- 1
- PR merge metrics
- No merged PRs in 30d
Description
Imported from the engineering backlog (
_bmad-output/implementation-artifacts/backlog.md, storysave-perf-sparse-v3).
Priority P3 (do-first order) | Severity: n/a | Status: idea | Epic: Save latency | Type: perf | Recorded: 2026-07-08
Problem / motivation
Ready: micro-win, feature-detect. SaveGame.toBase64 uses the chunked String.fromCharCode + btoa path everywhere; native Uint8Array.prototype.toBase64 (Chrome 140+/Firefox 133+/Safari 18.2+) measured meaningfully faster on large payloads. Worth a feature-detected fast path with the existing chunked fallback once support is broad. Binary columnar codec stays out of scope per the 2026-07-07 decision log (reaffirmed 2026-07-08: sparse JSON + level-1 deflate closed most of the gap; binary's remaining few ms don't buy the codec/migration risk). (Save-perf party, PR #156 takeover.)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at SaveGame.toBase64 and inspect how the existing chunked String.fromCharCode and btoa path is selected. Confirm the native Uint8Array.toBase64 feature-detection boundary and preserve the existing fallback. Done means supported browsers use the native path while other environments retain equivalent encoding behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- performance
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100