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

Load workflow selector after UI is rendered #453

Open
danielhollas opened this issue Aug 31, 2023 · 2 comments
Open

Load workflow selector after UI is rendered #453

danielhollas opened this issue Aug 31, 2023 · 2 comments
Labels
enhancement New feature or request

Comments

@danielhollas
Copy link
Contributor

Is your feature request related to a problem? Please describe.
One of the reasons why App loading is so slow is that some widgets interact with the DB during initialization.
One big offender in this area is the WorkChainSelector widget, which takes quite some time to load (and it gets worse with the number of workflows).

Describe the solution you'd like
It makes sense to first load the app and then load the workflow selector in the background.
I have already implemented this in my Atmospec app and it works great (and the code change is small). Please see this PR

ispg-group/aiidalab-ispg#216

Describe alternatives you've considered
An alternative would be to improve the widget so that it does not load all the workflow at once. But then we would need to end some kind of filtering based on a date (and possibly other parameters). That's definitely something to look at in the future.

CC @unkcpz this is what I mentioned on the call today. I thought I have already created this issue but apparently not. :-)

@superstar54
Copy link
Member

Hi @danielhollas this was fixed in #473 .

It makes sense to first load the app and then load the workflow selector in the background.

This works when loading the app, but it does not work when refreshing the workchain selector.

@unkcpz
Copy link
Member

unkcpz commented Sep 19, 2023

Hi, @superstar54, #473 is not what @danielhollas mentioned to load the selector after UI I guess. In his PR, he added a widget that only refreshes after the button is clicked. I reopen it, we can close it if we did the benchmark and confirm after your changes the loading time is negligible.

@unkcpz unkcpz reopened this Sep 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants