NASA-AMMOS / NASA-AMMOS/3DTilesRendererJS

Traversal: Improve traversal performance

Open
#678 5 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

performance
Dominant language
JavaScript
Stars
2.5k
Forks
416
Avg merge
17h 52m
Merged PRs (30d)
37

Description

Related to #669

  • Merge some of the functions. Like at least markVisibleTiles and markUsedSetLeaves.
  • Accumulate toggled tiles into a set or array so it can be iterated once rather than unnecessarily traversing through all parents.
    • Timing during tests in aerial example after load completes
      • Mark Used Tiles: ~3.1ms
      • Mark Used Set Leaves: ~0.35 ms
      • Mark Visible Tiles: ~0.1 ms
      • Toggle Tiles: ~0.25 ms
  • Lazily generate the error value & frustum state as-needed since it isn't always used.
    • Frustum state provides little to no benefit

Related goal: improve performance of loading / traversing tile set from https://github.com/iTowns/itowns/issues/2335

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the traversal functions named in the issue, especially markVisibleTiles, markUsedSetLeaves, and the tile-toggle path. Use the aerial example after loading completes to reproduce the listed timings, then verify that traversal behavior is unchanged while the targeted work is reduced and lazy values are only generated when needed.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, three.js
Domain
performance
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.