Skip to content

Add read-ahead buffering for small random-access reads - #2

Merged
mgenware merged 1 commit into
flutter-cavalry:mainfrom
neeraj-pilot:read-ahead
Aug 29, 2026
Merged

Add read-ahead buffering for small random-access reads#2
mgenware merged 1 commit into
flutter-cavalry:mainfrom
neeraj-pilot:read-ahead

Conversation

@neeraj-pilot

Copy link
Copy Markdown

Adds an opt-in ReadAheadRASource for consumers that perform many small, nearby reads and seeks. Across all eight exif_reader fixtures, it reduced median warm-cache macOS AOT latency from 97.2 ms to 7.0 ms and underlying FileRASource read calls from 4,974 to 19, with exact EXIF output parity.

Fixture Baseline Read-ahead Speedup Read calls
AVIF 6.94 ms 0.36 ms 19.4× 381 → 2
HEIC 59.88 ms 2.03 ms 29.6× 3,230 → 3
JXL 0.98 ms 0.13 ms 7.5× 43 → 2
JXL/Brotli 0.81 ms 0.50 ms 1.6× 12 → 3
PNG 1.95 ms 0.14 ms 13.9× 103 → 1
CR3 1.84 ms 1.35 ms 1.37× 19 → 3
RAF 17.86 ms 2.23 ms 8.0× 862 → 3
WebP 6.12 ms 0.29 ms 20.9× 324 → 2

@mgenware
mgenware merged commit e0e4a3b into flutter-cavalry:main Aug 29, 2026
@mgenware

Copy link
Copy Markdown
Member

Thank you! Published 4.3.0

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.

3 participants