Skip to content

Conversation

@ekropotin
Copy link
Owner

Replace per-node cursor creation with single reusable cursor for tree traversal.
This eliminates repeated allocations and improves performance for large documents.

Changes:
- Create single TreeCursor in walk() method instead of per-node cursors
- Refactor walk_pre_order and walk_post_order to use cursor navigation
- Use goto_first_child/goto_next_sibling/goto_parent for efficient traversal
- Maintain correct pre-order and post-order semantics

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

ekropotin and others added 2 commits September 11, 2025 13:59
Replace per-node cursor creation with single reusable cursor for tree traversal.
This eliminates repeated allocations and improves performance for large documents.

Changes:
- Create single TreeCursor in walk() method instead of per-node cursors
- Refactor walk_pre_order and walk_post_order to use cursor navigation
- Use goto_first_child/goto_next_sibling/goto_parent for efficient traversal
- Maintain correct pre-order and post-order semantics

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
@ekropotin ekropotin enabled auto-merge (squash) September 11, 2025 21:00
@ekropotin ekropotin merged commit d7e2fb9 into main Sep 11, 2025
4 checks passed
@ekropotin ekropotin deleted the dev branch September 11, 2025 21:01
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.

2 participants