Files
gods-eye-view/docs
Mazeyar Moeini FeizabadiandClaude Fable 5.2 db7cc785df perf(flights): make the fleet pass's ground-floor reads cheap
Every 80 ms the Flights and Military fleet passes read the ground floor for
each coasting aircraft. With the whole globe in view that is about 10,000
aircraft, and each read built three string keys through six toFixed calls and
rewrote the terrain cache to promote its entry. At 4x CPU throttle those reads
were 5.9 s of a 15.3 s profile.

- A coast above 9,000 m (no ground reaches it) skips the geodetic conversion
  and the floor read.
- cachedGroundFloor works its cell out once, as integers; mesh cells and the
  terrain cache's synchronous reads are found by numeric key.
- A synchronous terrain-cache read promotes its entry only when it has
  drifted halfway to eviction, not on every read.

Floors are unchanged: tests compare the reads against the string-keyed ones
on cell edges, near zero and out of range.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
2026-11-13 15:05:38 +01:00
..
2026-10-29 11:20:49 +00:00