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

Re-add children-in-frustum optimization #741

Open
gkjohnson opened this issue Sep 13, 2024 · 3 comments
Open

Re-add children-in-frustum optimization #741

gkjohnson opened this issue Sep 13, 2024 · 3 comments
Milestone

Comments

@gkjohnson
Copy link
Contributor

gkjohnson commented Sep 13, 2024

In d316413 the check for child visibility has been disabled because it can cause unused children to be added to the lru cache. We should understand why and see if we can add an easy way to check frustum visibility without marking a child as used.

  • This could be happening because nodes are left "orphaned" after an intermediate unused node is evicted while it's children remain marked as used and are then not unloaded - or unloaded and then the child tile json is reloaded since there are no more children to check.
  • We should only perform this check on render-able nodes? Or just not nodes that have un-renderable content?

The fundamental issue is that external tile sets are being marked as unused because the children aren't visible, being unloaded, then being marked as used again because there are no children and loading.

Related to #740

@gkjohnson gkjohnson added this to the v0.3.38 milestone Sep 13, 2024
@gkjohnson
Copy link
Contributor Author

gkjohnson commented Sep 13, 2024

@gkjohnson
Copy link
Contributor Author

gkjohnson commented Sep 14, 2024

In a test the frustum optimization improves the tile visibility from 350 to 323 so it can have quite an impact. With a more shallow approach this loads ~340 tiles on google earth tiles.

The limited approach may be "good" enough - otherwise this requires keeping all tile sub trees in memory.

@gkjohnson gkjohnson modified the milestones: v0.3.38, v0.3.39 Sep 15, 2024
@gkjohnson gkjohnson modified the milestones: v0.3.39, v0.3.38 Sep 29, 2024
@gkjohnson gkjohnson modified the milestones: v0.3.38, v0.3.39 Sep 29, 2024
@gkjohnson
Copy link
Contributor Author

It's possible we could keep the tile marked as "used" but mark "in frustum" to be false and account for that in the subsequent traversals. This would cause the tiles to still load but at least not be rendered.

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

No branches or pull requests

1 participant