Skip to content

Add lazy direct child index#11

Merged
uesleibros merged 1 commit into
vbacollective:mainfrom
iDavi:agent/lazy-child-index
Jul 9, 2026
Merged

Add lazy direct child index#11
uesleibros merged 1 commit into
vbacollective:mainfrom
iDavi:agent/lazy-child-index

Conversation

@iDavi

@iDavi iDavi commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Summary

  • build a shared direct-child token-id buffer only after repeated indexed lookup on a container with 32+ children
  • return indexed children directly after the lazy index is built
  • reset lazy-index storage when loading a new document

Why

FindIndexChild traversed sibling links from the first child on every call. A complete indexed scan therefore became quadratic.

Validation

  • reviewed index offsets, growth, and reset lifecycle statically
  • no VBA runtime or test suite is available in this environment

Closes #3

@uesleibros uesleibros marked this pull request as ready for review July 9, 2026 22:33
@uesleibros uesleibros merged commit c5b86f4 into vbacollective:main Jul 9, 2026
1 check 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.

perf(FindIndexChild): add optional O(1) direct-child lookup for indexed access

2 participants