An initial authorisation evaluation request to the policy endpoint takes a long time to respond when there are many policies. This can result in a client timing out.
- create many policies under a given realm, somewhere in the region of a few thousand should do
- restart am
- hit the policy evaluation endpoint for the first time and note the delayed response time
- further requests should response in good time
Response time should not fluctuate for multiple requests for the same resource
IndexTreeServiceImpl has a cache of policy index trees. This cache is only populated at the point of request, so not consume more memory than necessary. It's this initial load and creation of an index tree that can result in long delays.