Skip to content

Improve handling of intermediate search - #570

Open
ctz wants to merge 3 commits into
mainfrom
jbp-intermediate-source-2
Open

ctz wants to merge 3 commits into
mainfrom
jbp-intermediate-source-2

Conversation

@ctz

@ctz ctz commented Nov 26, 2026

Copy link
Copy Markdown
Member

fixes #540

Rejected alternatives:

  • preparsing into a Vec: this leaves the issue for no-alloc users.

  • fusing parsing and rejection by subject of candidate intermediates:
    improves performance of this area by 2.5x, done in this PR
    but is not a complete fix on its own.

  • extracting intermediates parsing/search behind a trait: will work, and
    be very flexible, but again leaves the issue for no-alloc users.

ctz added 3 commits November 26, 2026 12:52
Rejected alternatives:

- preparsing into a Vec: this leaves the issue for no-alloc users.

- fusing parsing and rejection by subject of candidate intermediates:
  improves performance of this area by 2.5x, will be landed separately
  but is not a complete fix on its own.

- extracting intermediates parsing/search behind a trait: will work, and
  be very flexible, but again leaves the issue for no-alloc users.

`test_too_many_path_calls` now covers both limits.
@codecov

codecov Bot commented Nov 26, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 98.03922% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 97.79%. Comparing base (2b4b026) to head (237d48d).

Files with missing lines Patch % Lines
src/error.rs 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #570      +/-   ##
==========================================
- Coverage   97.79%   97.79%   -0.01%     
==========================================
  Files          20       20              
  Lines        4395     4437      +42     
==========================================
+ Hits         4298     4339      +41     
- Misses         97       98       +1     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Comment thread src/cert.rs
Self::from_input(cert_der, UnknownExtensionPolicy::default())
}

pub(crate) fn from_der_for_subject(

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Nit: should be before from_der().

I think lints would warn at this commit about the unused method?

Maybe just squash this into the next commit?

@djc

djc commented Nov 26, 2026

Copy link
Copy Markdown
Member

But also, how much performance could we claw back for handshakes in processes that do have alloc if we kept parsed intermediates around?

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.

Path building re-parses every intermediate on each budgeted call (unbudgeted CPU cost)

2 participants