routinator icon indicating copy to clipboard operation
routinator copied to clipboard

Time spent on RSA validation for already valid cache

Open ties opened this issue 9 months ago • 1 comments

Hi,

A few weekends ago I was playing with profiling and I took a look at routinator to validate a hypothesis about where RPs spend most of their time. I was told that sha256 hashing of the files on manifest was the expensive operation.

Instead, when I run ./target/release/routinator vrps --noupdate -o /dev/null I see a significant amount of time being spent on public key verification (~24% of time).

I expected this to be an operation that would be cached in the store. Can you take a look at this?

ties avatar Mar 12 '25 07:03 ties

We cache the RRDP hashes but, as you observed, not the validation result. This was sort of with possible manipulation of the stored data in mind, but that may very well be a poor reason. Probably better than just caching the validation result is to keep the payload data a publication point contributes if it hasn’t changed at all.

I have a plan to introduce a fast initial validation run to get to an initial data set quicker. This would, of course, benefit greatly from such cached data.

partim avatar Mar 12 '25 08:03 partim