Skip to content
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

Dashboard load time impacted by extension unload #8895

Open
richard-cox opened this issue May 16, 2023 · 1 comment · May be fixed by #12822
Open

Dashboard load time impacted by extension unload #8895

richard-cox opened this issue May 16, 2023 · 1 comment · May be fixed by #12822

Comments

@richard-cox
Copy link
Member

richard-cox commented May 16, 2023

Scope update from @aalves08 (Nov 14th 2024): The goal here is to remove the unload mechanim from the code

Setup

  • Rancher version: 2.7.5ish
  • Rancher UI Extensions: kubewardn, elemental plus built in harvester-manager
  • Browser type & version:

Describe the bug

  • When plugins are initially loaded they call generic load functions
  • These generic load functions include a call to removePlugin
  • This shouldn't be needed on load. I think they were added as part of the dynamic load/unload of the harvester cluster plugin

harvester-manager flow

  • vue.config virtualModules --> initPlugin --> removePlugin --> uninstall --> updateMatcher
  • vue.config virtualModules --> initPlugin --> applyPlugin --> addRoutes --> updateMatcher

kubewarden and elemental

  • shell/plugins/plugin loadPluginAsync --> loadAsync --> element.onload --> removePlugin --> uninstall --> updateMatcher
  • shell/plugins/plugin loadPluginAsync --> loadAsync --> element.onload --> applyPlugin --> addRoutes --> updateMatcher

If we can be smarter when callign removePlugin we can chop out some undeeded churn (
removing products, clear model cache, locales, stores, plugin leave functions, and most importantly route changes

To Reproduce

  • add both elemental and kubewarden extensions
  • refresh on any page
@richard-cox richard-cox removed their assignment Sep 19, 2024
@codyrancher codyrancher modified the milestones: v2.10.0, v2.11.0 Oct 10, 2024
@nwmac nwmac modified the milestones: v2.12.0, v2.11.0 Nov 1, 2024
@richard-cox
Copy link
Member Author

Given changes to harvester and request to refresh on extension change we should be able to remove all unload logic

codyrancher added a commit to codyrancher/dashboard that referenced this issue Dec 5, 2024
The goal is to simplify the logic while possibly improving performance

fixes rancher#8895
codyrancher added a commit to codyrancher/dashboard that referenced this issue Dec 5, 2024
The goal is to simplify the logic while possibly improving performance

fixes rancher#8895
@codyrancher codyrancher linked a pull request Dec 5, 2024 that will close this issue
7 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants