Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Performance: load, parallelism and native core

Status: in progress.

Goal

The fastest software possible, technical cost accepted: work spread over the cores, the database off the event loop, a native core where it pays, and folders by theme, function and sub-function in every language. More memory or computation is accepted when it makes the interface smoother, measured per profile, TV included.

Steps

StepContentState
A1Database off the event loop, atomic settings writes (391, 392); TV under writes: WebSocket p50 120 to 15 msdone
A1bSettings in one request per batch, asynchronous get_db (394, 395); TV: PUT p50 220 to 78 msdone
A2ffmpeg stopped after 120 s without progress, bounded stderr, one launcher, storyboards at background priority (396 to 398)done
A3MediaExecutor (402): one heavy lane, 1 + clamp(nproc/2, 1, 4) threads; desktop: an import behind 20 storyboards 31 to 36 s down to 1 sdone
A4Folded search and sort keys stored per item (420); 3 820 items: search 37 to 48 ms down to 9 to 11 msdone
A5One rule, one source: bobine without app.config 0.23 to 0.13 s (467), shared generated outputs (468), proposed media names served by POST /api/media/names (470, 471)done
A6One broadcast socket per tab (485), serialized once per broadcast (513): 2 KB state_change at 10 clients 188 to 275 µs down to 55 to 80 µsdone
A7Native audio probe on by default (498); 140 µs per probe round tripdone
A8Cargo workspace native/ with a shared protocol crateto do
A9Native MP4 video probe, probe_video (517): ffprobe takes 56 ms per video on a desktop and 400 ms on a TV, the native probe 1.7 ms for a 52-minute class; 28 files compared: 18 identical, 10 handed back to ffprobe, 0 mismatchdone, not measured on a TV
A10bobine-devices: screens, WASAPI, inputs on the four profiles (505 to 512)waiting for hardware
SFolders by theme, one theme per pull request before the step that touches itto do

Target tree

The same themes everywhere: backend/app/theme/function/, backend/tests/theme/, frontend/src/components and lib by theme and function, native/crate/src/theme/platform/, com.bobine.app.theme. Guards: no database access in async def, no subprocess outside the launchers, about 12 files per folder.

Pending decisions

Rust dependencies core-graphics and landlock; a multiplexed WebSocket contract (a published format); a full Rust backend only after RSS and CPU measurements on a TV.

Pitfalls

Read then add on a settings key is not atomic: always put_setting. A route a test calls directly keeps its async form. A Session made by the dependency serves in the threadpool only, never concurrently. Compare suite durations of main and a branch in alternating runs: the load of the machine varies by half.