Skip to content

Test: a depth-bound glob runs at the speed of native find - #1329

Merged
thekevinscott merged 1 commit into
mainfrom
claude/1307-glob-speed
Oct 6, 2026
Merged

thekevinscott merged 1 commit into
mainfrom
claude/1307-glob-speed

Conversation

@thekevinbot

Copy link
Copy Markdown
Collaborator

Summary

Speed-of-light e2e test for a depth-bound glob: './*/*.md' over 32 top-level directories. Each holds markdown files, .txt files and dotfiles, plus a chain of directories five levels deep holding as many files again.

  • The glob can match only at depth two. A walk that descended further would read the chain for nothing.
  • One top-level directory is dot-named, and dotglob is off, so it must not be returned.
  • Native is find . -mindepth 2 -maxdepth 2 -type f -name '*.md' ! -path '*/.*'.

Fixes #1307

Status: red on main, green on the #1305 stack

The rows match native. On main the speed does not:

Build native dirsql ratio
main (test run) 1.700s 6.263s 3.7x
top of the stack, #1328 (test run) passes

Direct timing on a 1M-item tree built by the test's own builder (release CLI, warm cache):

Query find main #1328
./*/*.md path 0.38-0.50s 1.25-1.42s 0.23s
count(*) 0.16s

E2E Verification

N/A: test-only change. The new e2e test is the red on main. No receipt, because no package source changed.

@thekevinscott
thekevinscott merged commit b626445 into main Oct 6, 2026
39 checks passed
@thekevinscott
thekevinscott deleted the claude/1307-glob-speed branch October 6, 2026 00:09
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.

Glob speed: the walk stops where the pattern cannot match deeper

2 participants