flisk-startup-perf
Skill49 starsChanged 36 days agoMITView on GitHub
Finds out where a Flisk start (flisk up or the one-command flisk demo) spends its time, tells a slow start from a stuck one, and guides a fix with before and after numbers. Use when a user says the demo or flisk up is slow, hangs on "Starting services", or asks to speed up startup, image builds or the first run.
In this repository21 other files it gives its agents.
- AGENTS.mdAGENTS.md
- cli/AGENTS.mdAGENTS.md
- flisk-agent-opsSkill
- flisk-bug-hunterSkill
- flisk-buildSkill
- flisk-convertSkill
- flisk-doctorSkill
- flisk-e2e-authorSkill
- flisk-recipe-ai-agentSkill
- flisk-recipe-blogSkill
- flisk-recipe-saasSkill
- flisk-recipe-shopSkill
- flisk-recipe-startersSkill
- flisk-releaseSkill
- flisk-resourceSkill
- flisk-scan-convertSkill
- flisk-statusSkill
- flisk-tool-addSkill
- flisk-troubleshootSkill
- flisk-upSkill
- layer-autoresearchSkill
The file
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 2 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 24
No failure: it is slow. Go to step 2.
- Distinctive: line 44
Write the number down before the change (wall, slowest resource).
- Very specific: line 46
Add a test for the behaviour.
- Very specific: line 49
Do not claim a speed-up from a run on a machine whose Docker is unhealthy (docker images erroring, containers unhealthy, no free network …
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Flisk startup performance
The demo is P1 (AGENTS.md), so a slow or hung start outranks other work. Measure first; change one thing; measure again.
1. Slow or stuck?
Most "slow" reports are stuck starts. Run the analysis against the project's Tilt (the port is in the flisk up output; the default is 10350, and another project may have moved it):
node scripts/benchmark/startup-analysis.mjs --port <tilt port>FAILED: <resource>plus "can never start" means stuck. The count of "building" services in the demo frame includes services waiting on a failed resource. Read that resource's log (tilt --port <p> logs <resource>) and fix the cause. Known causes:init-networkswithall predefined address pools have been fully subnetted(Docker out of network ranges;flisk doctor --fix --scope=machine), a held host port, Docker not running.- No failure: it is slow. Go to step 2.
Also check that the command ran the version you think: npx prefers a node_modules/.bin/flisk in the current folder or any parent over the registry. A stale install in ~ hides every fix. ls ~/node_modules/@flisk-sh/flisk/package.json.
2. Where did the time go
The analysis prints wall time, parallelism (sum of build times over wall time; about 1 means one build did all the work) and idle time. Then:
- One long build with parallelism near 1: read its log. For
golden-layers-build, find the slow step:tilt --port <p> logs golden-layers-build | grep -E '^#[0-9]+ DONE [0-9.]+s' | sort -t' ' -k3 -rn | head. Anexporting to imagestep of 100 s or more points at the Docker store or too many parallel builds, not at the Dockerfile. - Many builds, parallelism at the Tilt limit: raise
FLISK_MAX_PARALLEL_BUILDS(default is one build per engine CPU, limited by memory, minimum 3, maximum 8, seeruntime/engine/topologies/tilt/resources/build_concurrency.star). Checkdocker infofor CPUs and memory first. - Idle time: something waits on a serial step.
scripts/benchmark/tilt-build-durations.mjslists the order.
Reference from a real run (4 CPU / 7.7 GB Docker, 2026-10-31): golden-layers-build took 167 s of a 177 s start with parallelism 1x. 102 s of it was the exporting to image step of l3-backend, and all 8 golden images are built even though a project may use fewer. Skipping unused golden targets is the next candidate; it needs a layer-usage check per project so no service loses its base image, and a cold run on healthy Docker to prove it.
3. Compare cold and warm
Cold means no golden images and no layer cache. The demo is cold for every new user, so cold is the number that matters. scripts/benchmark/flisk-up-warm-start.sh runs cold and warm rounds and writes summary.md.
4. Change and prove
- Write the number down before the change (wall, slowest resource).
- Make one change. Prefer work that is skipped (do not build targets the project does not use) over work that is faster.
- Add a test for the behaviour. A Starlark change needs a test in
cli/src/utils/__tests__ortests/; the demo flow is covered bytests/e2e/journeys/demo(it runs twice; keep it passing). - Rerun cold and write both numbers in the PR.
Do not claim a speed-up from a run on a machine whose Docker is unhealthy (docker images erroring, containers unhealthy, no free network ranges): fix the machine first or the numbers mean nothing.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

