Skip to content

refactor: record URL mappings during parsing - #138

Merged
luojiyin1987 merged 2 commits into
masterfrom
refactor/parser-owned-url-mappings
Sep 28, 2026
Merged

luojiyin1987 merged 2 commits into
masterfrom
refactor/parser-owned-url-mappings

Conversation

@luojiyin1987

@luojiyin1987 luojiyin1987 commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Record resource and definition URL segments from parser events.
  • Keep existing empty URL boundary handling.
  • Keep autolink URL mappings unavailable.
  • Remove the post-parse URL scanner and its span state.
  • Keep the URL benchmark on the production parse path.

This removes duplicate URL parsing and decoding.
It also reduces duplicated parser semantics.

Validation

  • pnpm test: 1978 tests passed.
  • pnpm run lint passed.
  • pnpm run build passed.
  • node scripts/bench-source-map.mjs --smoke passed.
  • node scripts/bench-parse.mjs --smoke passed with AST parity.

Benchmark

GitHub CI measured 696.31 ms for the 512 KiB URL case.
The CI growth ratio was 3.97x from 128 KiB to 512 KiB.
This keeps near-linear growth without a wall-time regression.

A local run measured 461.69 ms and a 3.61x growth ratio.

@luojiyin1987
luojiyin1987 merged commit c036c64 into master Sep 28, 2026
14 checks passed
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