Skip to content

perf!: compact python parser tables for runtime 10 - #40

Merged
exKAZUu merged 4 commits into
mainfrom
perf/compact-parser-tables
Oct 21, 2026
Merged

exKAZUu merged 4 commits into
mainfrom
perf/compact-parser-tables

Conversation

@exKAZUu

@exKAZUu exKAZUu commented Oct 21, 2026 •

Copy link
Copy Markdown
Member

Why

Reduce parser storage and parsing cost with profiled compact tables and measured compiler settings. Compared with published 8.0.0: tree-sitter-python.wasm: 455,925 → 411,830 bytes (9.7% smaller).

Requirements

  • required: Improve performance and binary size as much as possible in tree-sitter and our grammar repositories.
  • required: Backward compatibility and the current tree structure need not be retained.
  • required: For this PR, run review-booster, then complete-pr, then release.
  • required: Preserve valid-input acceptance, accurate source coordinates, error reporting, and agreement between incremental and fresh parsing.
  • chosen: Pin runtime 10.0.2 and regenerate with its matching CLI: it combines compact ABI 0x57420007 tables with lexical-continuation and incremental-recovery fixes.
  • chosen: Use Wasm optimization z after comparing s/z/2/3 alternatives because it balances parsing throughput and module size.

Customer Summary

Use @willbooster/web-tree-sitter 10.0.2 or willbooster-tree-sitter 10.0.2 or later within 10.x. Parse-tree grouping, including recovery, may change.

Technical Summary

Regenerate profiled sparse parser tables with ABI 0x57420007, select the measured Wasm compiler setting, and update runtime dependencies and compatibility documentation.

Testing

  • bun run verify passed.
  • bun run build/ci passed with the matching v10.0.2 CLI from the core release workflow.
  • All 39 unit tests passed; cargo test --locked passed.
  • Corpus/example audit (example files up to 1,000,000 bytes each) against published 8.0.0: 6,113 inputs, no newly rejected inputs or valid tree changes. Full PR CI passed on the reviewed head.

exKAZUu and others added 4 commits October 22, 2026 05:49
Co-authored-by: WillBooster (Codex CLI) <agent@willbooster.com>
Co-authored-by: WillBooster (Codex CLI) <agent@willbooster.com>
Co-authored-by: WillBooster (Codex CLI) <agent@willbooster.com>
Co-authored-by: WillBooster (Codex CLI) <agent@willbooster.com>
@exKAZUu exKAZUu self-assigned this Oct 21, 2026
@exKAZUu
exKAZUu merged commit 5230592 into main Oct 21, 2026
11 checks passed
@exKAZUu
exKAZUu deleted the perf/compact-parser-tables branch October 21, 2026 23:38
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