-
Notifications
You must be signed in to change notification settings - Fork 266
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Optimize active products (improves navigation performance) #10526
Conversation
786c834
to
80302ed
Compare
80302ed
to
c06c394
Compare
c06c394
to
b5adf74
Compare
Investigated the issue where refreshing whilst in the KubeWarden extension causes a
This does not happen in master
The optimisation in this PR means currentProduct does not call activeProducts and thus the cluster store doesn't get a schema section by the time KW onEnter calls it. TBH this worked by luck, we shouldn't initialise cluster store stuff before the cluster store is set up, and probably need to update kw onEnter given onEnter does not have access to the cluster (we could improve onEnter to handle both post mgmt store and cluster store setup... or improve notifications of this type so extensions can react to other parts of auth middleware process... or something better). |
Once Vue3 is landed, we should revisit if this is required. |
This PR makes further optimisations to improve navigation performance - primarily optimising the behaviour of the
activeProducts
getter in the store.Essentially, rather than always check whether every product is active, we more intelligently only check the top-level products for the app bar and the root products and its child products in the side nav.
Note, this improves performance, so there were a couple of areas where race conditions mean that things worked, where as with the improved performance, they don't.
On note is the call to
onEnter
- KubeWarden uses this and access thecluster
store, but this was being called beforeloadCluster
was called, so cluster schemas were not available.