Skip to content

perf!: compact java parser tables for runtime 10 - #42

Merged
exKAZUu merged 1 commit into
mainfrom
perf/compact-parser-tables
Oct 22, 2026
Merged

exKAZUu merged 1 commit into
mainfrom
perf/compact-parser-tables

Conversation

@exKAZUu

@exKAZUu exKAZUu commented Oct 22, 2026 •

Copy link
Copy Markdown
Member

Why

Reduce parser storage and parsing cost with profiled compact tables and measured compiler settings. Compared with published 9.0.2: tree-sitter-java.wasm: 318,730 → 315,827 bytes (0.9% 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 75 unit tests passed; cargo test --locked passed.
  • Corpus/example audit (example files up to 1,000,000 bytes each) against published 9.0.2: 8,104 inputs, no newly rejected inputs or valid tree changes. Full PR CI passed on the reviewed head.

Notes

Full-input Wasm comparison against published 9.0.2 measured throughput at parity (+0.04%) while reducing the module by 0.9%. Results describe the audited corpus/example workload.

Co-authored-by: WillBooster (Codex CLI) <agent@willbooster.com>
@exKAZUu exKAZUu self-assigned this Oct 22, 2026
@exKAZUu
exKAZUu merged commit b3d9d44 into main Oct 22, 2026
11 checks passed
@exKAZUu
exKAZUu deleted the perf/compact-parser-tables branch October 22, 2026 02:29
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