> ## Documentation Index
> Fetch the complete documentation index at: https://modal-computer-use.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Latency evidence

> Review the focused evidence for batching, subprocess execution, native X11 input, and the recorded cost estimate.

This page maps each focused latency claim to the artifact that supports it. Each artifact has a narrow scope.

## Evidence map

| Question | Primary evidence | Result boundary |
| - | - | - |
| Does one request reduce four-click overhead? | [Action-batching replication](https://github.com/ashtonchew/modal-computer-use/blob/4425402dbc681133252dbc54d971ea4c95bc0ffc/benchmark-data/modal-action-batching-ab-replication-2026-08-02.json) | 30 samples per arm in one clean later run |
| Does subprocess runner ownership affect command latency? | [Subprocess sample artifact](https://github.com/ashtonchew/modal-computer-use/blob/4425402dbc681133252dbc54d971ea4c95bc0ffc/benchmark-data/modal-subprocess-runner-ab-samples-2026-07-30.json) | 30 tracked samples for each of three dated arms |
| What supports the native X11 runner-effect claim? | [Native X11 runner matrix](https://github.com/ashtonchew/modal-computer-use/blob/4425402dbc681133252dbc54d971ea4c95bc0ffc/benchmark-data/modal-native-x11-runner-matrix-2026-08-02.json) | 12 cells in three blocks, with 30 samples per cell |
| Can a clean run reproduce the XTest direction? | [Native X11 clean replication](https://github.com/ashtonchew/modal-computer-use/blob/4425402dbc681133252dbc54d971ea4c95bc0ffc/benchmark-data/modal-native-x11-backend-ab-replication-2026-08-02.json) | 30 samples per arm over matching Connect paths |
| How was the six-cent value calculated? | [Cost estimate](https://github.com/ashtonchew/modal-computer-use/blob/4425402dbc681133252dbc54d971ea4c95bc0ffc/benchmark-data/modal-optimized-provider-cost-estimate-2026-07-30.json) | Recorded wall time and July 29 list rates |

## Action batching

The August 2 replication compared one ordered four-click request with four sequential click requests. The batch p50 was 10.34 ms. The sequential p50 was 21.05 ms. The measured p50 speedup was 2.04x.

The replication retained 30 samples per arm. It had no failed or replacement samples. Placement and cleanup checks passed.

The earlier July 29 artifact reported a 2.33x p50 speedup. Its raw sample arrays are unavailable. The later replication confirms the direction, but it does not reconstruct or supersede the July 29 run.

## Subprocess execution

The July 30 supporting artifact retains caller-observed, daemon, and transport-overhead sample arrays for three subprocess backends:

* `asyncio`
* `threaded`
* `isolated-asyncio`

The repository tests recompute summaries from those tracked arrays. Use this artifact when you need to verify the dated subprocess result from a fresh clone.

Each arm came from a separate run. The artifact preserves the original generated time and raw digest for each arm. Do not treat the arrays as paired observations.

## Native X11 input

Use the runner matrix as the primary source for the runner-effect claim. The matrix varied two inputs:

* Input backend: XTest or `xdotool`
* Subprocess backend: shared asyncio or isolated asyncio

It ran all four cells in each of three blocks. Each cell used a fresh Sandbox, one warmup, and 30 measured samples. All 12 cells passed the measurement and input checks.

For `xdotool` move-click, the shared asyncio runner was slower than the isolated runner in every block. The pooled shared-runner daemon mean was 122.62 ms. This value fell within the preregistered 25 percent range around the historical 146.33 ms mean.

The launch-scaling control supports an approximately 45 ms shared-runner contribution per `xdotool` launch. A move-click uses two launches. This matches the approximately 90 ms matrix delta without treating the historical and clean runs as one distribution.

The XTest move-click control stayed within the matrix gate in every block. The matrix therefore supports a subprocess-runner contribution under the controlled modern conditions. It does not assign the full historical difference to one cause.

The historical `146.33 ms` and `1.15 ms` values came from a three-sample dirty-worktree diagnostic. The [historical source manifest](https://github.com/ashtonchew/modal-computer-use/blob/4425402dbc681133252dbc54d971ea4c95bc0ffc/benchmark-data/modal-native-x11-historical-source-2026-07-23.json) preserves the exact source and rounded aggregates. It does not preserve the original sample arrays or their digests.

The clean replication measured move-click daemon means of 32.78 ms for `xdotool` and 1.56 ms for XTest. These values reproduce the direction under a different topology. They are not current replacements for the historical values.

## Sandbox termination evidence

The matrix runner recorded `ComputerSandbox.terminate(wait=True)` followed by client close for each cell. Focused tests verify that order. They also verify cleanup on benchmark and termination failures.

A later read-only Modal lookup found all 12 Sandboxes in a finished state with exit code 137. Modal documents code 137 for a user-terminated Sandbox. The [termination reconciliation](https://github.com/ashtonchew/modal-computer-use/blob/4425402dbc681133252dbc54d971ea4c95bc0ffc/benchmark-data/modal-native-x11-sandbox-termination-reconciliation-2026-08-03.json) does not prove an audit-log event, an invoice entry, or historical handle detachment.

## Cost estimate

The recorded run wall time was 520.875 seconds. The formula applies that duration to one 1 CPU, 2 GiB Function and one 1 CPU, 2 GiB Sandbox. It then applies the recorded July 29 rates and a 1.75 region multiplier.

The result is \$0.06408. The rounded claim is about six cents.

`billing_reconciled` is `false`. The estimate excludes image builds, storage, network transfer, model usage, plan fees, credits, discounts, taxes, and additional non-overlapping resource lifetimes. Treat it as a list-price reconstruction, not an invoice.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.