-
Notifications
You must be signed in to change notification settings - Fork 14
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
Implementing lazy-loading #802
base: main
Are you sure you want to change the base?
Conversation
@PNOGillespie Hi Peter. I'm reaching out regarding this PR in hope that you may assist with one part relating to your XAS plugin. To keep it brief, the A simple solution would be to do as @superstar54 did in the XPS plugin, i.e., wrap such logic in a function to be lazily triggered on demand. Do you think this is something you could look into in a separate PR? If not, could you please comment on the reason? |
Hi @edan-bainglass. I can move the logic for updating the pseudopotentials (which is what lines 67 - 112 in I'm somewhat busy both this week and next, but I should be able to put together a separate PR soon for the changes if it's just a case of moving things around. |
Hi @PNOGillespie 👋
Yes, this sounds right. As stated, @superstar54's approach in the XPS plugin is likely the way to go, for reference 🙂 Once the PR is ready, I test against my lazy-loading work and we see more clearly if it's sufficient 👍
No worries. The lazy-loading work will take a few pass (possibly incremental PRs), so the XAS part can be addressed once your PR is in. Thanks 🙏 |
70c7539
to
1d107d9
Compare
@PNOGillespie @superstar54 just wondering, why were the XPS and XAS plugins included in the core app? Would it be better to maintain them as external plugins, say |
db361e3
to
fa7c4ef
Compare
fa7c4ef
to
9b6d792
Compare
This PR aims to improve the user's experience by isolating loading of widgets/resources to where they are needed (requested).
The overall approach is as follows (per widget):
__init__
logic to a newrender
method__init__
selected_index
trait of the container)render
methodRe-rendering is guarded against using new
self.rendered
boolean, which isFalse
and set toTrue
at the end ofrender
.At the initial stages of this PR, most state observation (
dlink
ing between widgets) will be disabled, as the entire logic must be rewritten to accomodate lazy-loading.The current working approach considered here is a mediator state manager, i.e., a context manager.
More to come!