Skip to content

perf(homepage): reduce artifact JSON escaping#73

Merged
VrianCao merged 1 commit intomasterfrom
perf/homepage-artifact-escape
Apr 14, 2026
Merged

perf(homepage): reduce artifact JSON escaping#73
VrianCao merged 1 commit intomasterfrom
perf/homepage-artifact-escape

Conversation

@VrianCao
Copy link
Copy Markdown
Owner

What

  • Switch homepage preload HTML/SVG attributes to single quotes to reduce JSON escaping in the precomputed render artifact.

Why

  • The homepage artifact snapshot stores preload_html inside JSON. Using "-heavy markup increases JSON.stringify cost + snapshot size; single quotes reduce escaping while keeping identical rendered HTML/UX.

Where

  • apps/worker/src/snapshots/public-homepage.ts

How to verify

  • Local: pnpm lint && pnpm typecheck && pnpm test
  • Prod: compare Workers Metrics CPU (homepage refresh + P90) and artifact payload size.

@VrianCao VrianCao merged commit a1d128c into master Apr 14, 2026
4 checks passed
@VrianCao VrianCao deleted the perf/homepage-artifact-escape branch April 14, 2026 11:52
VrianCao added a commit that referenced this pull request Apr 14, 2026
…scape"

This reverts commit a1d128c, reversing
changes made to a06d5ad.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant