Skip to content

perf(web): skip base64 for oversized image candidates - #110

Merged
tarik02 merged 2 commits into
mainfrom
backport/skip-oversized-image-base64
Aug 3, 2026
Merged

perf(web): skip base64 for oversized image candidates#110
tarik02 merged 2 commits into
mainfrom
backport/skip-oversized-image-base64

Conversation

@tarik02

@tarik02 tarik02 commented Aug 3, 2026

Copy link
Copy Markdown
Collaborator

What Changed

Backports pingdotgg#5220.

  • Check the estimated base64 data URL length from the encoded blob size.
  • Skip base64 conversion for candidates that already exceed the size budget.
  • Restore bounded thread subscription replay lost during the fork’s last upstream sync so the existing server tests pass.

Why

Image compression converted every canvas candidate to base64 before checking whether it fit. Large images repeated this work across each quality and downscale attempt.

The fork sync left thread subscriptions replaying to Number.MAX_SAFE_INTEGER instead of the captured head, which broke three existing tests.

Checklist

  • This PR is small and focused
  • I explained what changed and why
  • UI screenshots are not applicable
  • Animation video is not applicable

@github-actions github-actions Bot added size:S vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. labels Aug 3, 2026
@github-actions github-actions Bot added size:M and removed size:S labels Aug 3, 2026
@tarik02
tarik02 merged commit 130e977 into main Aug 3, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant