Skip to content

Conversation

@jailln
Copy link
Contributor

@jailln jailln commented Mar 17, 2025

Based on #2521

Related to #2522

@gchoqueux
Copy link
Contributor

I agree that pendingSubdivision should be removed. At the time of development, we introduced tile asynchronicity to handle streamed DEM tiles or to compute tiles in workers.

@gchoqueux
Copy link
Contributor

gchoqueux commented May 19, 2025

We need to remove pendingSubdivision and hasEnoughTexturesToSubdivide, which are only used during texture initialization.
A local texture, used to initialize the level 0 tile, would make these properties unnecessary.

@gchoqueux
Copy link
Contributor

When you remove tiles instancing from scheduler, there is no more earlyDropFunction mechanism, to avoid unnecessary instancing.

@Desplandis Desplandis requested a review from gchoqueux May 28, 2025 14:02
@gchoqueux
Copy link
Contributor

Sorry, earlyDropFunction doesn't exist for TiledGeometryLayer

} catch (e) {
return Promise.reject(e);
}
// TODO removed a try catch here that didn't seem needed after a first quick look, but needs to be re-checked
Copy link
Contributor

Choose a reason for hiding this comment

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

Yes, there's no need to add a try block. Could remove comment

Comment on lines -15 to 16

function _minimizeNetworkTraffic(node, nodeLevel, currentLevel, source) {
// TO DO source.isVectorTileSource is a temp fix for pendingSubdivision.
// see issue https://github.com/iTowns/itowns/issues/2214
if (node.pendingSubdivision && !source.isVectorTileSource) {
return currentLevel;
}
function _minimizeNetworkTraffic(node, nodeLevel) {
return nodeLevel;
}
Copy link
Contributor

@gchoqueux gchoqueux Jun 3, 2025

Choose a reason for hiding this comment

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

this method could be removed

case STRATEGY_MIN_NETWORK_TRAFFIC:
default:
nextLevelToFetch = _minimizeNetworkTraffic(node, nodeLevel, currentLevel, layer.source);
nextLevelToFetch = _minimizeNetworkTraffic(node, nodeLevel);
Copy link
Contributor

Choose a reason for hiding this comment

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

If you remove _minimizeNetworkTraffic

Suggested change
nextLevelToFetch = _minimizeNetworkTraffic(node, nodeLevel);
nextLevelToFetch = nodeLevel

if (node.parent.pendingSubdivision) {
node.visible = false;
node.material.visible = false;
this.info.update(node);
Copy link
Contributor

Choose a reason for hiding this comment

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

the updating info is released in each case ?

// display iff children aren't ready
node.material.visible = node.pendingSubdivision;
node.material.visible = false;
this.info.update(node);
Copy link
Contributor

Choose a reason for hiding this comment

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

this.info.update(node); Could this call be written only once in this method?

*/
subdivideNode(context, node) {
if (!node.pendingSubdivision && !node.children.some(n => n.layer == this)) {
if (!node.children.some(n => n.layer == this)) {
Copy link
Contributor

Choose a reason for hiding this comment

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

may be could be write
if (node.children.length)Because the children can only be on the same node's layer (to be verified).

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.

3 participants