Skip to content

SplatSorter appears to keep polling after sorting is settled #61

@StoneHub

Description

@StoneHub

Hi, we noticed a likely idle CPU issue while using MetalSplatter in a long-lived passive rendering surface.

SplatSorter.sortLoop() appears to keep running/polling when chunks are loaded, even after needsSort == false. In a scenario where the camera is settled and no rotation or interaction is happening, this can still contribute idle CPU because the sorter loop does not exit while chunks is non-empty.

A local experiment changed the idle behavior so the sorter suspends when no sort is pending:

  • exit the sort loop when !hasExclusiveAccess && !needsSort
  • restart the loop when chunks/camera changes mark needsSort = true
  • avoid marking needsSort for effectively unchanged camera poses using a small pose threshold

That appears to preserve sorting behavior when the camera or chunks actually change, while letting the background task stop after the scene settles.

Would you be open to this behavior upstream, or is there a reason the sorter should keep polling while chunks exist even when needsSort == false?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions