Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Option to disable background loading. Performance improvement on JupyterLab startup. #188

Closed
danilopeixoto opened this issue Jul 1, 2022 · 5 comments

Comments

@danilopeixoto
Copy link
Contributor

Description

Can Gator provide an option to disable background loading?
Mamba Gator is slowing down the JupyterLab at startup.

Reproduce

mamba install -y mamba_gator

  1. Go to JupyterLab after startup.

Expected behavior

Limitating resource usage or option to disable background loading.
A better performance.

Context

Environment: K8s
CPUs: 2
Memory: 8G

@danilopeixoto danilopeixoto changed the title Option to disable background. Performance improvement on JupyterLab startup. Option to disable background loading. Performance improvement on JupyterLab startup. Jul 1, 2022
@fcollonval
Copy link
Member

Thanks for the suggestion @danilopeixoto

Introducing a new user setting will be best to address this. I can provide pointers if you want to push a PR.

@danilopeixoto
Copy link
Contributor Author

Hi @fcollonval,

First, thank you for the Mamba Gator development.

Is this the line to add a condition?

https://github.com/mamba-org/gator/pull/42/files#diff-4cb47daf968330dba84ee8069d23ca03354e3e77068181e77f055b61f3719cceR41

Adding a condition here, will prevent the Gator from loading packages in background?
Next loading events will happen just when using the Mamba Gator UI?

@fcollonval
Copy link
Member

Is this the line to add a condition?

https://github.com/mamba-org/gator/pull/42/files#diff-4cb47daf968330dba84ee8069d23ca03354e3e77068181e77f055b61f3719cceR41

Indeed this is the one.

Adding a condition here, will prevent the Gator from loading packages in background? Next loading events will happen just when using the Mamba Gator UI?

Yes


To add a user parameter, you will need to edit the settings json schema (something like fromHistory):

Then you can modify the line:

Private.loadPackages(model);

like that:

-   Private.loadPackages(model);
+   if (settings?.get('<param name>') ?? true) {
+     Private.loadPackages(model);
+   }

@danilopeixoto
Copy link
Contributor Author

Thanks @fcollonval. Created #190.

@fcollonval
Copy link
Member

Closing as resolved.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants