Skip to content

Terrain deformation loops scan from row 0 wastefully #3257

Description

@bobtista

createCraterInTerrain and all four flattenTerrain loops calculate iMin.y, then ignore it and start at j = 0. The shape checks reject those rows, so the terrain result is correct, but the wasted work increases with the object's Y position.

Reproduction:

  1. Spawn BlastCraterGenerator at a high Y coordinate.
  2. Profile createCraterInTerrain.
  3. It scans each column from row 0 instead of iMin.y.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

MinorSeverity: Minor < Major < Critical < BlockerPerformanceIs a performance concern

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions