Repository navigation
perf: share pixel codec across play and replay - #87
Merged
Merged
Conversation
haimuhaimu
marked this pull request as ready for review
November 17, 2026 02:43
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
用户价值
像素邮局的画纸、收件练习、寄件与 AI 回放复用同一份编码程序,减少重复下载及实例化,不增加玩法。
实测与原因
发布前用独立 Chromium 冷加载公开 pixel.html,观察到 pixel-core.mjs 通过三个不同 query URL 加载:cat-postage-byte-v1、recipient-1、studio-postcards-v2。每份 decodedBodySize 为 9,887 B,encodedBodySize 为 3,484 B(本次响应 gzip)。本地修复后只加载一次,少两份 decoded source(19,774 B)。这是资源数量/字节证据,不是整页速度倍数或真实手机耗时承诺。
聚焦改动
保留边界
三猫素材、画纸、旧草稿、收件练习、分暗号、打乱对照、JSON 收据及学习记录格式均不改;不自动上传,不改 GenAI OS 进度。旧版刷新本就不保存活动寄件轨迹,本次保持该行为,明确重新寄出才产生新轨迹。线上核心文件已有数日未变,缓存 max-age=600;旧缓存可能短暂延后去重收益,不改变玩法。
验证
建议审阅路径
先看 pixel.mjs / pixel-tool.mjs 的首行,再看两个加载回归,最后检查 pixel.html 入口。合并前确认当前 head CI 与最新 main 合并候选验证通过。