Skip to content

LazyLoading: Unmount panels out of view #1147

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

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

torkelo
Copy link
Collaborator

@torkelo torkelo commented Jun 13, 2025

A quick test to improve lazy loading in scenes.

Lazy loading in the old architecture is actually much better as it lazy loads the panels on first load and does not cause queries to be issued for panels out of view while in scenes we only do lazy loading for initial load.

A quick solution would be to unmount when things go out of view, but a big drawback to this simple approach is that now queries will be cancelled when you scroll a loading panel out of view so in order to see the results of a panel that takes a long time to load you have to keep it in view.

Think we also need to to do a quick poc on passing isInView as a prop to viz panel rendering and scene query runner

@torkelo torkelo requested review from kaydelaney and dprokop June 13, 2025 07:40
Copy link
Collaborator

@dprokop dprokop left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Think we also need to to do a quick poc on passing isInView as a prop to viz panel rendering and scene query runner

This would be optimal solution. I think what we could do is to expose lazy loaders's isInView through panel context, so that VizPanelRenderer could perform an effect on the change, and suspend query execution for the corresponding SQR.

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