maniator / maniator/verticopolis

[Feature]: [P3] Native Uint8Array.toBase64 for save encoding (feature-detect micro-win)

Open
#341 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
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, story save-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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.