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

support skipping aspects-load from workspace.jsonc by either a prop on a command or --self-mode flag #8849

Merged
merged 15 commits into from
May 7, 2024

Conversation

davidfirst
Copy link
Member

@davidfirst davidfirst commented May 1, 2024

This is about the loadAspects triggered from the Workspace during the onStart hook, which loads the aspects set on the workspace.jsonc file.
It takes time and if it's possible to avoid it, it improves the performance. (on a new react workspace, it saves as much as 500ms).
The reason this is needed is that users can add aspects which register to various slots and if these aspects are not loaded, they won't be registered. Also, keep in mind, that these aspects are not dependencies of the components, so the fact that workspace components are loaded, doesn't mean that these aspects will be loaded.

Until now, it was skipped for bit login/logout. It was hard-coded.
With this PR, the machanism is baked into Component class. Also, it is skipped for all legacy commands. These commands don't use any slots, so it's fine to not load the aspects for them.
The global flag --safe-mode was changed as well to avoid loading the aspects.

@davidfirst davidfirst changed the title wip, try to minimize the loadAspects during bootstrap to a limited set of commands add "loadAspects" to the Command class to allow skipping this step May 3, 2024
@davidfirst davidfirst changed the title add "loadAspects" to the Command class to allow skipping this step support skipping aspects-load from workspace.jsonc by either a prop on a command or --self-mode flag May 7, 2024
@davidfirst davidfirst merged commit 3b1fafc into master May 7, 2024
11 checks passed
@davidfirst davidfirst deleted the bootstrap-limit-load-aspects branch May 7, 2024 23:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants