Conversation
69f9509 to
e88375b
Compare
Haven't reviewed the contents of the diff yet, but speaking strictly about the effects it has in The baseline I shared the other day was rustls-ffi 0.15 and curl 8.14.1:
Here's the same test but
A quick back-of-the-envelope check ( |
|
I'm a little enticed to build a parser type that can hold on to the temporary buffers across PEM files for use in rustls-native-certs, but maybe that's overkill? |
I think for rustls-native-certs with its current API, the best we could do is one allocation per certificate. So another option would be making the base64 decoder in this crate operate in-place, meaning that the temporary buffer for PEM decoding is the one returned in each |
What trade-offs are you thinking about? |
Thinking about this more, we're already doing ~1 allocation per certificate in the scenario under test. Opportunities for further improvement:
Feels like none of these are as low-hanging as the stuff I did here, so I'm not convinced it's worth chasing them down now. |


+57 lines so it's not free, but IMO the complexity isn't much worse, by virtue of using more descriptive types/functions and pushing complexity to the edges.
What do you think?
@cpu want to run this through your test setup?