Stage 0 (0.129): baseline on the emulator: first run, navigation map, timings

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-10 16:36:17 +00:00
co-authored by Claude Opus 5.5
parent 51db35d0c9
commit 9ae1438854
9 changed files with 332 additions and 3 deletions
@@ -410,7 +410,7 @@ internal fun DirectorChair(load: (DirectorMode) -> DeskReport?, first: FocusRequ
var lesson by remember { mutableStateOf<DeskLesson?>(null) }
var eventOpen by remember { mutableStateOf<DeskEventIdea?>(null) }
val scope = rememberCoroutineScope()
LaunchedEffect(mode, version) { withContext(Dispatchers.Default) { runCatching { load(mode) }.getOrNull() }?.let { report = it; OrbitTiming.ready("Director's Chair") } }
LaunchedEffect(mode, version) { withContext(Dispatchers.Default) { runCatching { load(mode) }.getOrNull() }?.let { report = it; OrbitTiming.ready("Settings/Director") } }
Column(modifier, verticalArrangement = Arrangement.spacedBy(8.dp)) {
Row(verticalAlignment = androidx.compose.ui.Alignment.CenterVertically, horizontalArrangement = Arrangement.spacedBy(6.dp)) {
Text("DIRECTOR'S CHAIR", color = ChairGold, fontFamily = Anton, fontSize = 20.sp)
@@ -21,7 +21,7 @@ import java.util.concurrent.Executors
* - `key`: a remote key pressed, to the end of the next frame drawn after it (the screen's answer to the press).
* - `screen`: a screen opened (from the key press that opened it, when there was one), to the end of its first frame.
* - `ready`: a screen that loads first (Director's Chair), from opening to its content shown.
* - `tune`, `firstFrame`, `firstSound`: a programme asked for, its player ready, its first picture, its sound starting.
* - `playerReady`, `firstFrame`, `firstSound`: from a programme being asked for to its player ready, its first picture, and its sound starting.
* - `frames`: once a minute, frames drawn, frames over 16.7 ms and over 33 ms, the slowest, and the memory in use.
*/
internal object OrbitTiming {
@@ -95,7 +95,7 @@ internal object OrbitTiming {
fun ready(name: String) { if (!on) return; opened.remove(name)?.let { record("ready", (System.nanoTime() - it) / 1e6, JSONObject().put("screen", name)) } }
fun tune(channel: Int?) { if (on) { tuneAt = startFrom(System.nanoTime()); tuneChannel = channel } }
fun prepared() { since("ready") }
fun prepared() { since("playerReady") }
fun firstFrame() { since("firstFrame") }
fun firstSound() { since("firstSound") }
private fun since(kind: String) {