3DTilesRendererJS icon indicating copy to clipboard operation
3DTilesRendererJS copied to clipboard

TilesRenderer: Load order can result in children loading first, taking LRUCache space before parents

Open gkjohnson opened this issue 5 months ago • 1 comments

This can be an issue when the renderer settings trigger tiles to load that immediately overflow the cache (as happens with #1065). This can result in a case where children are loaded but the parents are not. We may need to adjust the cache eviction approach to eject tiles that should be loaded with lower priority to ensure this inconsistency is avoided.

gkjohnson avatar Jul 20 '25 01:07 gkjohnson

Relating to #1237 - one issue is that unless the download priorities are very in sync with the lru cache unload priorities then all tiles will continue to download and push out existing tiles until those that align with the lru cache priority function are left, leading to a lot of download and churn. It's best to just prevent tiles from downloading further if the cache is full.

Some other options to consider:

  • Download queue children until the parents are loaded so they will always load first. This will delay downloads, though, and reduce the ability to display a load percent.
  • Somehow block child parsing or completion of loading until parents are ready. Possibly allow for retrieving or checking for parent promise in the associated parse queue. But need to find nearest parent with content?

gkjohnson avatar Jul 22 '25 11:07 gkjohnson