Boot 8.7 s → 4.4 s: parallel character decode + EN-055 anim instances - #32
Conversation
SH-049 said 'the aliens is 5.5 s of boot - a ModelAnimation per SLOT. That is the one number to attack.' Attacked, and the attribution was wrong: sub-timed, ALL animation parsing was 43 ms (load_gltf_animation never decodes images). The 4.9 s was seven SERIAL loadModel calls PNG-decoding ~25 character textures on the main thread. - All 8 character GLBs (player + 7 kinds) now decode in parallel worker threads at BOOT_PLAYER via stageModels(), and each stage commits its handles where it used to load: main commits the player, initEnemyPool commits the aliens. Requires engine PR #107, which fixed the two staged-commit bugs that would have silently degraded quality (aux texture remap dropped normal/MR/emissive/occlusion maps; normal maps registered through the sRGB path instead of register_texture_kind). - Per-slot animation handles are EN-055 instances over the per-kind clip set (instantiateAnimation) - same independence guarantee (own mixer, own joint state), no duplicate parses. New [anim] boot log line proves the instances are live handles (0 = dead), same rationale as the [music] probe. - docs/tickets.md SH-049 carries the correction, so the wrong 61% attribution cannot cost anyone else an afternoon. Measured (BOOT_TIMING, same box, same stages): TOTAL 8702 -> 4372 ms the aliens 5098 -> 214 ms (commits 160 ms + anims 32 ms + slots 2 ms) the marine 1190 -> 1777 ms (hosts the whole parallel decode batch) Verified: title-screen F12 capture - the bsuit's normal/MR/emissive maps render pixel-faithful through the staged path (the exact surface the engine fixes protect); AITEST batch run - enemies spawn from staged models, close 57 m to melee, cycle AI states, zero errors; [anim] clipset=2 slot0=9 slot1=10 on the boot log.
|
Warning Review limit reached
Next review available in: 44 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: ⛔ Files ignored due to path filters (2)
📒 Files selected for processing (5)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
…-cache Deleting the documented-but-wrong path is a no-op; it faked a stale-build conclusion during the EN-055 work before the real cache was found in the compile log's own 'Reused cached object' lines.
Two things the textually-clean auto-merge would have shipped broken: - #28 removed KIND_COUNT/ALIEN_GLB from main.ts imports; this branch's stageModels batch uses both. Re-added - a green Perry compile does not catch absent cross-module imports (ReferenceError at boot). - This branch (and #30) accidentally committed dxcompiler.dll/dxil.dll: both were branched before #29's .gitignore landed, so 'git add -A' swept the untracked DLLs in, and #30's merge carried them onto main. Untracked again here (files stay on disk - the game needs them beside the exe; see EN-058). Verified on the merged tree: compile green, 14 s batch run boots to the menu with [music] menu=1 calm=2 combat=3 and [anim] clipset=2 slot0=9 slot1=10 both live.
Depends on engine PR #107 (instantiateAnimation + the two staged-commit quality fixes). Merge that first.
SH-049 told us to attack
the aliens= 5.5 s of boot, blamed on per-SLOT ModelAnimation loads. Sub-timing says the attribution was wrong: all animation parsing was 43 ms — the 4.9 s was seven serialloadModelcalls PNG-decoding character textures on the main thread.What changed
stageModels) at BOOT_PLAYER; the player and the aliens commit their staged handles where they used to load.[anim]boot-log line proves live instance handles (like the[music]probe — silent failure here would look like frozen enemies).Measured
Verified (quality-neutral by evidence, not assumption)
Note: this branch touches the same main.ts/enemies.ts regions as #28/#30 — whichever merges last takes a trivial conflict resolution (import lists).