Skip to content

perf(sitemapd): speed up large sitemap parsing - #650

Merged
harlan-zw merged 1 commit into
mainfrom
perf/sitemapd-large-sitemaps
Aug 3, 2026
Merged

perf(sitemapd): speed up large sitemap parsing#650
harlan-zw merged 1 commit into
mainfrom
perf/sitemapd-large-sitemaps

Conversation

@harlan-zw

Copy link
Copy Markdown
Collaborator

🔗 Linked issue

No linked issue.

❓ Type of change

  • 📖 Documentation
  • 🐞 Bug fix
  • 👌 Enhancement
  • ✨ New feature
  • 🧹 Chore
  • ⚠️ Breaking change

📚 Description

Parsing a 10.1 MiB sitemap with 50,000 plain URL records spent most of its time allocating XML parser state for each record. This adds a scanner based fast path with a validated fallback for complex XML, preserves fetch chunks instead of joining them, and skips redundant encoding for string input. Median local retained parse time fell from 452.4 ms to 75.0 ms; fetched bodies also avoid one full size buffer copy.

@pkg-pr-new

pkg-pr-new Bot commented Aug 3, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/@nuxtjs/sitemap@650

commit: 89c9d02

@harlan-zw
harlan-zw merged commit 20d1192 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

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant