Large files on an aindrive drive open several times faster #3

Merged
RaymondCho merged 1 commits from reuse-last-read into main 2026-10-13 21:55:46 +00:00
Owner

Memona reads a remote file one 1 MiB slice per call, and each slice fetched the whole file again. The last file read is now kept for the slices that follow, reused only while a fresh stat shows the same revision. Follows lead/memona-plugin-aindrive#2

Verified: 40 unit tests; through Memona's host an 8 MiB file read in 1.1 s instead of 6.8 s, and in the app its download took 1.5 s, matching its SHA-256. Nothing on screen changes.

🤖 Generated with Claude Code

Memona reads a remote file one 1 MiB slice per call, and each slice fetched the whole file again. The last file read is now kept for the slices that follow, reused only while a fresh stat shows the same revision. Follows https://git.capsulizers.com/lead/memona-plugin-aindrive/pulls/2 Verified: 40 unit tests; through Memona's host an 8 MiB file read in 1.1 s instead of 6.8 s, and in the app its download took 1.5 s, matching its SHA-256. Nothing on screen changes. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
RaymondCho requested review from bot 2026-10-12 14:28:21 +00:00
bot approved these changes 2026-10-12 14:35:07 +00:00
bot left a comment
Owner

✅ Approved
Stat-validated cache reuse is correct; no blocking findings.

Review

Strengths
  • The cache is reset on connection lifecycle changes and keys reuse by path and freshly statted revision.
  • The regression test covers repeated slices and invalidation after a revision change.
Checks
  • cargo fmt --check
  • cargo clippy --locked --all-targets -- -D warnings
  • cargo test --locked --lib (40 passed)
  • cargo build --locked --release --target wasm32-wasip2
  • git diff --check cc320ee..969e1d5
Declined to judge
  • None.

Profile: codex · gpt-5.6-terra

✅ Approved Stat-validated cache reuse is correct; no blocking findings. ## Review <details> <summary>Strengths</summary> - The cache is reset on connection lifecycle changes and keys reuse by path and freshly statted revision. - The regression test covers repeated slices and invalidation after a revision change. </details> <details> <summary>Checks</summary> - `cargo fmt --check` - `cargo clippy --locked --all-targets -- -D warnings` - `cargo test --locked --lib` (40 passed) - `cargo build --locked --release --target wasm32-wasip2` - `git diff --check cc320ee..969e1d5` </details> <details> <summary>Declined to judge</summary> - None. </details> > Profile: `codex` · `gpt-5.6-terra`
RaymondCho changed target branch from save-and-delete to main 2026-10-13 21:54:32 +00:00
RaymondCho added 1 commit 2026-10-13 21:54:32 +00:00
Large files on an aindrive drive open several times faster
CI / checks (pull_request) Successful in 37s
8d206bac1b
The host reads a file one 1 MiB slice per call, and every slice fetched
the whole file again, so an 8 MiB file crossed the network eight times.
The last file read is now kept for the slices that follow: each slice
still stats the file first and reuses the reply only at the same
revision, so a file changed in between is fetched afresh.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
RaymondCho closed this pull request 2026-10-13 21:54:33 +00:00
RaymondCho reopened this pull request 2026-10-13 21:54:33 +00:00
RaymondCho merged commit 018b7aa25d into main 2026-10-13 21:55:46 +00:00
Sign in to join this conversation.
No Reviewers
No Label
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: commons/memona-plugin-aindrive#3