Skip to content

perf(extractors/solana): memory map CAR files for faster reading#1552

Merged
sistemd merged 3 commits intomainfrom
sistemd/mmap-car-files
Jan 14, 2026
Merged

perf(extractors/solana): memory map CAR files for faster reading#1552
sistemd merged 3 commits intomainfrom
sistemd/mmap-car-files

Conversation

@sistemd
Copy link
Contributor

@sistemd sistemd commented Jan 14, 2026

This seems to give ~20% performance improvements on early epochs (up to ~50% with release builds!). Might be even more later on as the amount of data per epoch gets bigger since the improvements are additive.

@sistemd sistemd requested a review from LNSD January 14, 2026 11:43
Copy link
Contributor

@LNSD LNSD left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM ✅

Please, check my comments 🙂


let buf_reader = match tokio::fs::File::open(&dest).await.map(tokio::io::BufReader::new) {
Ok(reader) => reader,
let file = match std::fs::File::open(dest) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would recommend using fs_err instead of std::fs for better error reporting.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sistemd sistemd merged commit 7f28b08 into main Jan 14, 2026
8 checks passed
@sistemd sistemd deleted the sistemd/mmap-car-files branch January 14, 2026 22:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants