Description
The problem arises from the following sequence:
- user logs in
- PluginManager.start starts ObservationRegistry
- ObservationRegistry starts JcrListerners
- JcrListener subscribes the FacetRootsObserver
- FacetRootsObserver queries for faceted navigation nodes to fetch docbases in entire repository
- Fetching the docbase requires loading and authenticating the node
- The node loading triggers the faceted navigation node to populate
So the login requires to populate all the facet navigations at once which gets very slow and is very cpu intensive and uses a lot of memory per session. This is especially problematic when a lot of virtual structures are used within the CMS>
I see two possible solutions:
- disable the facetrootsobservation: is it still used? We could not think of a use case
- make the observation lazy: only when a facet navigation node is browsed, it's docbase(s) get added to the observation