Question
Can the pre-up devpod status call be avoided, cached, or answered more
cheaply?
Every launch pays it, warm ones included: 0.43-0.74s measured across runs. On
a warm launch that is the whole overhead outside the single ssh trip — a 2.7-3.5s
launch of which ~20% is asking devpod a question about state.
The neighbouring call has already been dealt with, which is the reason to think
this one is tractable: devpod context options is disk-cached, keyed so that
the cache expires when devpod's own config file changes rather than on a TTL
alone (context_options in clients/devpod.rs and the flow that caches it) —
which is why a warm launch shows no devpod context span at all, only devpod status. There is a worked pattern in this repo for exactly this shape of
problem, and a second one in the tool-verdict cache, which keys off the mtime of
devpod's workspace_result.json.
What makes this harder than the context cache, and what the answer must handle:
- Staleness here is not cosmetic.
status is what decides warm versus cold.
A stale Running sends a launch down the fast-attach path at a container that
is gone; the cost of being wrong is a failed launch, not a slow one. Any cache
needs a key that cannot silently agree — the same bar
#158 applied when it rejected
an mtime+size key under principle 3.
docker inspect answers the same question in ~0.02s on the docker
provider, which is 20-35x cheaper — but it is provider-specific, so it lands in
the same fast-path-versus-one-mechanism argument as the sibling tickets. Decide
it consistently with them.
- Or the call may be removable rather than cacheable. Ask whether the warm
path needs a separate status at all, or whether the information is already
available from state devpod has written to disk, or recoverable from the attach
attempt failing cleanly. A launch that just tries and falls back may be both
faster and more honest than one that asks first — or it may be worse, if the
fallback is expensive or the failure is ambiguous.
ContainerState is already a total sum with an Unknown(String) arm for a
word this build has not heard of; whatever answers the question must keep that
property rather than collapsing it to a boolean.
Where these numbers come from
All figures below were measured on 2026-08-24 against the Rust build
(rust/target/release/dl, dl 0.13.0), driven from inside this repo's own
devcontainer (nested docker-in-docker, devpod 0.26.1, docker 29.7.2, 8 CPUs).
DEVPOD_HOME, DEVPOD_SSH_CONFIG and XDG_CACHE_HOME were scoped to a scratch
directory; the target was blooop/dotfiles with a warm image and a warm bare
clone cache.
Caveat, and it is not small: nested DinD is not the host. Absolute seconds
here run higher than a host launch, and this is not the CI trend point
#292 is about. What transfers
is the ratios and the floors — the pieces are A/B'd against each other in one
environment. The host cross-check is that README's own host medians (warm
2.176s, cold-recreate 15.899s) sit close to what was measured here (warm
2.7-3.5s, cold 13.1-15.5s).
Question
Can the pre-
updevpod statuscall be avoided, cached, or answered morecheaply?
Every launch pays it, warm ones included: 0.43-0.74s measured across runs. On
a warm launch that is the whole overhead outside the single ssh trip — a 2.7-3.5s
launch of which ~20% is asking devpod a question about state.
The neighbouring call has already been dealt with, which is the reason to think
this one is tractable:
devpod context optionsis disk-cached, keyed so thatthe cache expires when devpod's own config file changes rather than on a TTL
alone (
context_optionsinclients/devpod.rsand the flow that caches it) —which is why a warm launch shows no
devpod contextspan at all, onlydevpod status. There is a worked pattern in this repo for exactly this shape ofproblem, and a second one in the tool-verdict cache, which keys off the mtime of
devpod's
workspace_result.json.What makes this harder than the context cache, and what the answer must handle:
statusis what decides warm versus cold.A stale Running sends a launch down the fast-attach path at a container that
is gone; the cost of being wrong is a failed launch, not a slow one. Any cache
needs a key that cannot silently agree — the same bar
#158 applied when it rejected
an mtime+size key under principle 3.
docker inspectanswers the same question in ~0.02s on the dockerprovider, which is 20-35x cheaper — but it is provider-specific, so it lands in
the same fast-path-versus-one-mechanism argument as the sibling tickets. Decide
it consistently with them.
path needs a separate
statusat all, or whether the information is alreadyavailable from state devpod has written to disk, or recoverable from the attach
attempt failing cleanly. A launch that just tries and falls back may be both
faster and more honest than one that asks first — or it may be worse, if the
fallback is expensive or the failure is ambiguous.
ContainerStateis already a total sum with anUnknown(String)arm for aword this build has not heard of; whatever answers the question must keep that
property rather than collapsing it to a boolean.
Where these numbers come from
All figures below were measured on 2026-08-24 against the Rust build
(
rust/target/release/dl,dl 0.13.0), driven from inside this repo's owndevcontainer (nested docker-in-docker, devpod 0.26.1, docker 29.7.2, 8 CPUs).
DEVPOD_HOME,DEVPOD_SSH_CONFIGandXDG_CACHE_HOMEwere scoped to a scratchdirectory; the target was
blooop/dotfileswith a warm image and a warm bareclone cache.
Caveat, and it is not small: nested DinD is not the host. Absolute seconds
here run higher than a host launch, and this is not the CI trend point
#292 is about. What transfers
is the ratios and the floors — the pieces are A/B'd against each other in one
environment. The host cross-check is that README's own host medians (warm
2.176s, cold-recreate 15.899s) sit close to what was measured here (warm
2.7-3.5s, cold 13.1-15.5s).