Skip to content

fix(tinylinkify): leave www out of the URL search when it doesn't link www. - #36

Merged
onmax merged 1 commit into
mainfrom
fix/tinylinkify-fuzzylink-off
Nov 16, 2026
Merged

onmax merged 1 commit into
mainfrom
fix/tinylinkify-fuzzylink-off

Conversation

@onmax

@onmax onmax commented Nov 16, 2026

Copy link
Copy Markdown
Owner

With fuzzyLink: false, tinylinkify/gfm still stalls on text like ':// ' + 'www._'.repeat(16000) + '.a.b': 80 KB takes 3.7 s. The URL search turns down every www match when www. links are off, and each one reads the rest of its host again, so the fix for rejected candidates in #35 never kicks in.

This gives the URL search no www alternative when www. links are off, since every such match would be turned down anyway. The same input now takes under a millisecond. A new test fails without the fix, and find on main and on this branch agree on 400,000 fuzzed strings under all 8 combinations of options.

#35's fix also put the root and tinylinkify/gfm about 120 B gzip over their size budgets, which CI doesn't check. This raises the budgets to 1985 B and 2460 B and updates the sizes in the docs.

Follow-up to #35

Reviewed with sol-loop: 1 round with gpt-6.1-sol on xhigh. Sol verdict: approved

…www.

With fuzzyLink off, every www match was turned down, and each one read the
rest of its host again: 80 KB took 3.7 seconds. The search now has no www
to find then.

The fix for rejected candidates in #35 grew the root and tinylinkify/gfm
past their size budgets, by about 120 B gzip, so the budgets go to 1985 B
and 2460 B and the sizes in the docs to match.
@chatgpt-codex-connector

Copy link
Copy Markdown
Codex Review Summary: ❌ Failed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ❌ Failed 2026-11-16T16:29:45.953843Z
We couldn’t complete this review. Comment @codex review to try again.
b735829 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@pkg-pr-new

pkg-pr-new Bot commented Nov 16, 2026

Copy link
Copy Markdown

Open in StackBlitz

tinyaml

pnpm add https://pkg.pr.new/onmax/tiny/tinyaml@36

tinyini

pnpm add https://pkg.pr.new/onmax/tiny/tinyini@36

tinyjson5

pnpm add https://pkg.pr.new/onmax/tiny/tinyjson5@36

tinylinkify

pnpm add https://pkg.pr.new/onmax/tiny/tinylinkify@36

tinyswap

pnpm add https://pkg.pr.new/onmax/tiny/tinyswap@36

commit: b735829

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ No new issues found. No P0 or P1 findings remain.

Reviewed changes — Reviewed all seven changed files, including the GFM finder, its public callers, the regression test, and bundle-size updates.

  • Option-aware URL search: Uses an HTTP-only regex when fuzzyLink is disabled, avoiding repeated scans of rejected www candidates while preserving capture groups and URL processing.
  • Performance regression coverage: Exercises the long repeated-www input with fuzzyLink: false and checks that the following HTTPS link is preserved.
  • Size budgets and documentation: Raises the root and /gfm budgets and updates published sizes to match the measured bundles.

Validation passed: all 36 tests against both source and built exports, formatting/lint/type checks, and bundle-size checks. An additional 800,048 comparisons against the pre-change implementation agreed across all eight option combinations; the 80 KB reproducer improved from about 4.1 seconds to 0.63 ms without changing its results.

Pullfrog  | View workflow run | Using gpt-6.1-sol(xhigh) | 𝕏

@onmax
onmax merged commit defd8ca into main Nov 16, 2026
10 checks passed
@github-actions github-actions Bot mentioned this pull request Nov 16, 2026
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