dofs: resolving a directory scans its children as the directory grows
Maintainer thường phản hồi trong vòng 1 ngày
@aron-cf đang làm issue này rồi.
Từ ngày 13/10/2026.
Đánh giá
Issue này chưa được đánh giá.
Mô tả
Looking up /wide gets slower as children are added under it, even though the lookup does not request a child. I found this while investigating file recovery in OpenMeld.
This reproduces with the resolver SQL and core schema taken directly from 0.5.1, ef00c0a790cb87887bf209fa87838cb1a281220b, without our application or its patches.
What happens
Looking up /wide, with 20,000 children:
Before: find /wide -> inspect its children -> discover the path is finished
After: find /wide -> discover the path is finished
Time for 100 lookups of the same directory, median of seven samples:
| Children in /wide | Original query | Three ordered joins |
|---|---|---|
| 100 | 3.61 ms | 0.97 ms |
| 1,000 | 15.54 ms | 0.55 ms |
| 5,000 | 86.61 ms | 1.07 ms |
| 20,000 | 327.57 ms | 0.73 ms |
Linux arm64, Node 24.21.0, SQLite 3.53.4, Docker limited to 1 CPU / 1 GiB, no swap. macOS with SQLite 3.51.2 shows the same trend. These are in-memory query timings, not whole-sync or production recovery timings.
Reproduce
Script, raw samples, query plans and proposed patch
Save repro.mjs, then run:
node repro.mjs > results.json
Requires Node 24+ and network access to download two pinned upstream source files. No npm packages. Setup is outside the timed section; the two variants alternate which runs first.
Cause and proposed fix
In resolveViaCte, SQLite joins directory entries before reading the next path segment. The directory lookup can use only the parent half of its existing primary key:
Before: SEARCH d USING PRIMARY KEY (parent_inode=?)
After: SEARCH d USING PRIMARY KEY (parent_inode=? AND name=?)
Changing the three recursive JOINs to CROSS JOINs keeps the segment ahead of the directory lookup. Predicates, result ordering and schema stay unchanged. No new index or cache.
The script checks equal results for five path shapes at each width. After applying the patch to the clean upstream source, all 37 resolver, symlink and stat tests passed. This is focused coverage, not a full runtime test.
May I submit a PR?
I read the contribution policy, so I have not opened a PR. Would you be willing to invite me to submit this fix with regression coverage? The three-join patch is in the reproduction above. I am happy to adjust it to your preferred approach.
- Ngôn ngữ chính
- TypeScript
- Star
- 9.6k
- Fork
- 558
- Merge trung bình
- 1 ngày 19 giờ
- Pull request đã merge (30 ngày)
- 52
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của cloudflare/computer
-
WorkspaceProxy wakes Durable Objects via idFromString(), clearing ctx.id.name for Agents/LifecycleCó thể đã có người làm @aron-cf đã nhận 2 ngày trước. Đang mởbug
cloudflare/computer#243 · 1 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 30/100
cloudflare/computer#224 · 5 bình luận · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Always run the "next" computerd workflow on push to the `release` branchCó thể đã có người làm @aron-cf đã nhận 8 ngày trước. Đang mởbug
cloudflare/computer#222 · 2 bình luận · 1 reaction · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Make just-bash and acorn optional peer dependencies, pulled in only by the backend that needs themĐang mởenhancement
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 45/100
cloudflare/computer#220 · 3 bình luận · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Workspace namespaces: more than one Workspace per Durable Object storageCó thể đã có người làm @aron-cf đã nhận 9 ngày trước. Đang mởenhancement
cloudflare/computer#219 · 1 bình luận · 1 reaction · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của cloudflare/computer
Issue tương tự
-
backend priority:P3 privacy-fix
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
[Bug]: 【优化】对话消息底部增加发送时间展示Đang mởbug desktop v3 windows
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
esengine/DeepSeek-Reasonix#13697 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area:security documentation effort:S priority:P2
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
Maintainer thường phản hồi trong vòng 1 ngày
-
app:web meta:ops
Độ khó 2/5 Nửa ngày Mức phù hợp với người mới 78/100
osu-tournament-rating/otr#1113 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100