Skip to content

Use mmap to read filters#76

Closed
ctz wants to merge 1 commit intomainfrom
jbp-mmap
Closed

Use mmap to read filters#76
ctz wants to merge 1 commit intomainfrom
jbp-mmap

Conversation

@ctz
Copy link
Copy Markdown
Member

@ctz ctz commented Feb 20, 2026

This is probably not a serious proposition (converting valid filesystem alterations into memory safety issues isn't great) but acts as a measurement that upki is performance-sensitive in this path.

I have some ideas about how to improve this in a more robust way that need a bit of investigation/measurement.

revocation-check        time:   [2.9656 ms 2.9855 ms 3.0063 ms]
                        change: [−51.569% −50.952% −50.331%] (p = 0.00 < 0.05)
                        Performance has improved.
Found 3 outliers among 100 measurements (3.00%)
  3 (3.00%) high mild

@codspeed-hq
Copy link
Copy Markdown

codspeed-hq bot commented Feb 20, 2026

Merging this PR will not alter performance

✅ 4 untouched benchmarks


Comparing jbp-mmap (6201ad4) with main (d18ff83)

Open in CodSpeed

@djc
Copy link
Copy Markdown
Member

djc commented Feb 20, 2026

Seems bad that CodSpeed doesn't detect an improvement here?

@ctz
Copy link
Copy Markdown
Member Author

ctz commented Feb 20, 2026

Yeah unfortunately it doesn't measure time in syscalls. Though I'd really expect the large allocation for the fs::read buffer to feature somewhere, but I think it is being drowned by the deserialisation allocations (a good learning for #33 maybe)

@ctz
Copy link
Copy Markdown
Member Author

ctz commented Apr 9, 2026

I think this proved a point, which is that we were IO-sensitive in revocation checks. See #89 for an alternative approach.

@ctz ctz closed this Apr 9, 2026
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.

2 participants