Skip to content

Use coarse data first to make zooming smooth#47

Closed
meggart wants to merge 2 commits intomainfrom
fg/smooth_remote
Closed

Use coarse data first to make zooming smooth#47
meggart wants to merge 2 commits intomainfrom
fg/smooth_remote

Conversation

@meggart
Copy link
Copy Markdown
Member

@meggart meggart commented Jul 18, 2024

I played a bit with the plotting script and adapted it so that it falls back to coarser levels when zooming in and the new data is not loaded yet. This results in smoother zooming although this could still be optimised.

Copy link
Copy Markdown
Member

@felixcremer felixcremer left a comment

Choose a reason for hiding this comment

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

This introduces some strange flickering on zooming also in the local data. Can we somehow restrict this to the cloud data or get rid of the flickering.

Comment thread src/PyramidScheme.jl

function DiskArrays.cache(p::Pyramid; maxsize=1000)
maxsize = maxsize ÷ (length(p.levels) + 1)
Pyramid(DiskArrays.cache(p.base; maxsize), DiskArrays.cache.(p.levels; maxsize), p.metadata)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

We might want to use the setter functions here instead of the access to the fields of the struct. So it should be parent(p) instead of p.base and DD.metadata(p) instead of p.metadata.

Comment thread src/PyramidScheme.jl
#First load overview
overview1 = min(n_agg + 4, nlevels(pyramid))
data = levels(pyramid)[overview1][ext]
odata = Observable{Any}(data)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Why is this an Observable{Any} should we restrict this to AbstractDimArray?

@felixcremer
Copy link
Copy Markdown
Member

felixcremer commented Jul 29, 2024

I also get this strange behaviour at some zoom steps. This is way faster on the screen than on the screencast.
Screencast from 29.07.2024 14:35:26.webm

It seems as if we can hit some update loops.

@felixcremer
Copy link
Copy Markdown
Member

I hope that the behaviour that prompted this PR is now also fixed with the new recipes.
Closing for now since this would need a major refactor anyway.

@felixcremer felixcremer closed this Feb 3, 2026
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