kibana/x-pack/plugins/features/server/routes
Pierre Gayvallet 8ce205999a
features plugin: improve capabilities caching (#153743)
## Summary

- Avoid constructing the capabilities passed to core's capability
provider for each request
- Add proper *explicit* lock mechanism to the feature registry
- Some other minor cleanup, probably

#### Before:

(look at the `getFeatureUICapabilities` block)

<img width="1629" alt="CleanShot 2023-03-26 at 09 55 45@2x"
src="https://user-images.githubusercontent.com/1532934/227951476-1edbd2bc-f60b-4529-8c22-ff0d9511b2b8.png">

#### After

<img width="1640" alt="CleanShot 2023-03-27 at 14 58 31@2x"
src="https://user-images.githubusercontent.com/1532934/227951533-dbe675c3-7089-4b36-86a9-584a3e97c860.png">
2023-03-28 10:01:43 +02:00
..
index.test.ts features plugin: improve capabilities caching (#153743) 2023-03-28 10:01:43 +02:00
index.ts Change ContextContainer to lazily initialize providers (#129896) 2022-04-22 13:15:58 +02:00