# Performance

> Every number we measured for Minekube, in one place - what was measured, on what, and when - for live swaps, bundles, tests, the live view, the browser wall and Connect's connector and relay.

This page holds every performance number in the Minekube docs. Each one says what was measured, where and when. All of them come from local runs on a developer's machine. None of them is a production measurement, and none is a promise.

## Live swap

Measured on December 6, 2026, on a laptop, with the hub's bundle of about 1 MB.

| What | Before | After |
| --- | --- | --- |
| Longest stall of the server thread when the bundle is installed | 1.8 s | 138 ms |
| Stall of the server thread for a live swap | 1.8 s | 39 ms |

The change: the Minekube plugin evaluates a new bundle on a thread of its own, and only starting it and the swap run on the server thread. Before that change, the same install stalled the hub's server thread for about 20 s, on 250 millicores of CPU. The stall after the change has not been measured on the hub itself yet.

## Bundles

Measured locally on a developer machine, in December 2026, as an estimate for running bundles outside a JVM.

| What | Value |
| --- | --- |
| The launcher's built bundle (680 KB), evaluated in a fresh Node 24 (V8) context | About 9 ms |
| Its heap after evaluation | About 1 MiB, with about 8 MiB more resident memory |

## Tests

Measured on December 6, 2026, around 11:23 in Berlin, on an Apple M4 Pro with Bun 1.4.4: `bun test examples/launcher/src examples/launcher/client`.

| What | Value |
| --- | --- |
| Tests: the rules' Stories, `Story.explore`, the replay of a recorded session, a divergence check and the bot's Story | 7 tests, 408 `expect()` calls |
| Wall time over 4 runs | 114 to 124 ms |

The web app in `apps/web` builds in 0.26 s with Vite under Bun (December 2026, on a developer machine).

## Live view

Measured on a Mac in December 2026, as recorded in the live view's design notes.

### Renderer

A synthetic stream of hills with 1,902 sections and 750 meshes. Means of several runs. Frames stayed at 16.7 ms in every column.

| | Main thread only | Web workers | Web workers and frustum culling |
| --- | --- | --- | --- |
| Until everything is meshed | 1.45 to 1.5 s | 0.37 to 0.43 s | 0.34 to 0.38 s |
| Script time per frame while meshing (median) | 9.5 ms | 5.4 ms | 4.3 ms |
| Script time per frame afterwards | 4.4 ms | 4.4 ms | 1.8 ms |

A section meshes in 1.6 ms on average.

### World stream

| What | Value |
| --- | --- |
| A section in the stream | 1.3 KB and 0.35 ms of client time on average. The camera takes at most 4 ms of each tick for sections. |
| A moving entity | 0.4 to 2.7 KB per tick |
| The camera's time for entities | 0.4 to 0.8 ms per tick for 4 to 44 entities; about 1 ms per tick for 19 entities with items, text and a skin, after warm-up |
| A rain test | About 70 `Weather` frames, 13 to 22 KB together |
| Particles in rain with splashes | About 13 KB per tick |
| An idle stream, with no block light in view and nothing moving | Under 50 bytes per second, one `Tick` frame |

### Accuracy against the real client

Each test compares a picture from the browser with a screenshot from the Minecraft client, and counts the pixels that differ by more than 8 of 255.

| Test | Pixels that differ |
| --- | --- |
| Baked models and textures, Minecraft 26.3 | All 35,723 block states and all 1,300 textures identical |
| Terrain: water behind glass, a flooded stair, flowing water and lava, under the sky | 1 to 2 of 1.6 million |
| Entities: items on the ground and in a frame, a named minecart, a mannequin with a skin, a sign with text, a leashed pig, a falling block and shadows | 18 of 190,000 entity pixels |
| Dusk, looking into the setting sun | 2 of 1.6 million |

The browser loads the client jar (41 MB) once and checks it against Mojang's SHA-1.

## Browser wall

[Kitesurf](https://github.com/cloudflare/kitesurf) `2026.12.2` in Docker, on an Apple M4 Pro, over loopback, one shared Chrome DevTools Protocol connection, five runs per mode. Written down in December 2026.

| What | Default mode | Boa mode |
| --- | --- | --- |
| From creating a session to the first matching image | 159 to 175 ms | 169 to 245 ms |
| From the start of a click to the matching image | 9 to 42 ms | 8 to 40 ms |
| From a mouse wheel event to the matching image | 23 to 34 ms | 20 to 29 ms |
| Size of a click or scroll image, as PNG before Base64 | 5,534 to 5,674 bytes | 5,534 to 5,674 bytes |

The path through Minecraft maps, Cloudflare's hosted Kitesurf and a comparison with Chrome were not measured.

## Networking

Measured on December 5, 2026, on one Mac with Apple Silicon, over loopback, with `mk server --network`. Nothing of this ran in production.

### Latency

A status ping, 200 samples per path, each on a new connection. Median and 95th percentile:

| Path | Ping in the connection | Status from connect |
| --- | --- | --- |
| Velocity directly | 0.08 / 0.12 ms | 0.26 / 0.44 ms |
| Velocity through the relay | 0.25 / 0.30 ms | 0.44 / 0.58 ms |
| Paper directly | 0.05 / 0.09 ms | 0.29 / 0.47 ms |
| Paper through Velocity's selector port, connector to connector | 0.30 / 0.38 ms | 1.68 / 2.41 ms |

The relay costs about 0.2 ms per round trip on loopback. Opening a connection through a selector includes one question to the registry, a little over 1 ms locally.

An echo through the relay and the connector in the JVM, sent evenly by a Rust client, takes 0.75 ms in the median.

### Resources and recovery

| What | Value |
| --- | --- |
| The connector as its own process, without a JVM | 15 MB at start, 18 MB in a network with no players, 20 MB with 200 sessions |
| The relay, idle | 20 MB, 0.1 % CPU |
| The relay with 200 streams, each sending 1 KiB 20 times a second both ways | 27 MB, 43 % of one core |
| From start until reachable | About 3 s, almost all of it iroh waiting for network probes that a local relay without TLS cannot answer |
| Outage when a server restarts, from the signal to the first echo through the relay | 5.1 s, after a crash as after a clean stop |
| A change of the server's network during a session | No tick lost in 100 ticks 50 ms apart; slowest echo 14 ms |
| The dev network's Velocity | Over 2 GB of resident memory at a 1 GB heap |

### What limits these numbers

- They are loopback numbers on macOS.
- 200 messages sent at once, as a server tick sends them to every player, take about 9 ms until the last one is through. That is CPU time per message, about 140 µs for a round trip across all processes, three quarters of it in the kernel. Linux batches UDP packets and macOS does not; Linux is not measured yet.
- The network change test checks that iroh rebuilds its paths, not a real change of IP address.
