From 0e9f4dab52d2d07bf99e108149a22609351e376f Mon Sep 17 00:00:00 2001 From: Sunil Srivatsa Date: Mon, 17 Aug 2026 13:03:16 -0700 Subject: [PATCH] docs(changelog): record the tree cache and boundary prune --- packages/natives/CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/natives/CHANGELOG.md b/packages/natives/CHANGELOG.md index 8dd3f04aa..d8844c63e 100644 --- a/packages/natives/CHANGELOG.md +++ b/packages/natives/CHANGELOG.md @@ -2,6 +2,10 @@ ## [Unreleased] +### Changed + +- `enclosingBlockBoundaries` and `blockRangeAt` now reuse a parsed tree-sitter tree when the same source and language were parsed before, and skip subtrees whose line span holds no visible line. Together these cut the block-context work the `read` tool performs on every non-raw read: for an 81KB TypeScript source with a mid-file window, 13.4ms to 4.45ms on a first parse and to 0.149ms once the tree is cached; for a 1.06MB source, 188.1ms to 55.8ms and to 0.440ms. The tree cache is bounded (12 entries, 4MiB of retained source) and verifies content byte-for-byte on every hit, so a hash collision can only cost a re-parse. The subtree skip is proven equivalent by differential comparison against the exhaustive walk across 4827 repository files and 38,616 window comparisons. + ## [17.3.5] - 2026-08-16 ### Fixed