ListEvaluationResults is slow in some cases
Describe the issue
@danbarr says
I'd been tinkering with the artifact signature rule, so I've been refreshing the Alerts and History tabs a bunch
This caused ListEvaluationResults latency to hit >1s @50th and >2s at 95th. I also see ~700 log messages of the form:
2024-10-08T22:13:12.699Z properties are valid, skipping provider fetch
2024-10-08T22:13:12.695Z entity found, fetching properties
2024-10-08T22:13:12.691Z fetching entity with properties
2024-10-08T22:13:12.691Z properties fetched
Note that this seems to be around 10ms for fetching the properties of a single entity; with 200 entities, we might expect to see times on the order of... 2 seconds.
To Reproduce
No response
What version are you using?
Live (production)
Some details on the project I was testing in...
Total of 3 repos, 5 profiles in the project.
The two profiles I was actively poking have 29 and 1 rules respectively. I was working with the stacklok/artifact_signature and artifact_attestation_slsa rules trying to figure out my failures, so I was bouncing between listing my alerts and history (filtering down to Artifact entity type to find my results).
LMK if any other details would be useful!
@JAORMX @jhrozek