# What the Glitchless SDK costs a web game, measured

> Measured in Chrome on a real three.js scene: the Glitchless browser SDK adds 33.7 KB gzipped to a Three.js game, about 0.6 µs of work per frame, 2 KB of data a minute and half a megabyte of memory, with no measurable change in frame time. The script that measures it is open source.

Website: https://www.glitchless.gg/glitchless-sdk-overhead.html · Glitchless browser SDK 0.7.0, three.js r186, Chrome 156

A tool that measures frame time shouldn't cost frame time. Here is what the Glitchless browser SDK costs a game, measured in Chrome with the script that ships in the SDK's repository, so you can run it on your own machine and your own game.

## The short answer

- **Download:** a Three.js game adds 33.7 KB gzipped (29.9 KB with brotli).
- **Per frame:** about 0.6 µs of JavaScript, 0.004% of a 60 fps frame. Every 5 seconds a 6.5 µs summary, every 15 seconds an 8 µs batch.
- **A real scene:** 400 meshes with shadows, five runs each way: 1.29 ms of main-thread time per frame without Glitchless and 1.22 ms with it. The difference is smaller than the spread between runs.
- **Network:** one request every 15 seconds, about 2 KB a minute.
- **Memory:** about 0.55 MB more JavaScript heap after a minute.

## How it was measured

On an Apple M3 Max laptop, macOS, in Chrome 156 with the real GPU (ANGLE on Metal), driven by Playwright, on 27 October 2026. The script is [`packages/sdk/bench/overhead.mjs`](https://github.com/glitchless-gg/glitchless/blob/main/packages/sdk/bench/overhead.mjs) in the Glitchless repository. It measures five things: what a game downloads, the SDK's own work in a tight loop, a real three.js scene with and without the SDK, the data it sends in a minute, and the memory it holds.

Run it yourself:

```sh
git clone https://github.com/glitchless-gg/glitchless && cd glitchless
npm install
npm run build -w glitchless
node packages/sdk/bench/overhead.mjs          # about two minutes; --quick skips the network and memory minute
```

A phone is slower than this laptop, often several times slower per operation. Even at ten times slower, the per-frame work stays under 10 µs, well under a tenth of a percent of a 16.7 ms frame.

## Download size

A Three.js game imports the core and the Three.js adapter, and a bundler leaves out the Phaser, Babylon.js and PlayCanvas adapters. The full bundle, for a `<script>` tag, has all four.

| What | Minified | gzip | brotli |
| --- | --- | --- | --- |
| A Three.js game (`Glitchless` and `instrumentThree`) | 106.3 KB | 33.7 KB | 29.9 KB |
| The full bundle, every engine adapter | 138.3 KB | 44.0 KB | 39.0 KB |

## Work on the main thread

The SDK does a little every frame and a little more every few seconds. Each was timed over millions of frames with realistic frame times: mostly 16.7 ms, 2% slow frames and an occasional 80 ms hitch.

| Work | How often | Time |
| --- | --- | --- |
| Time the frame: two clock reads, a sketch of frame times, a few counters | Every frame | 0.6 µs |
| Summarise the window: percentiles, hitches and their likely causes, the level's counts | Every 5 s | 6.5 µs |
| Write the batch as JSON (12 events, 3 KB) | Every 15 s | 8 µs |
| Compress the batch (3 KB to 0.6 KB) with the browser's `CompressionStream` | Every 15 s | 0.36 ms from start to end, as a stream |

Sending uses `fetch`, which doesn't block the game. When the tab is hidden or closed, the last batch goes with `navigator.sendBeacon`. The SDK never reads pixels back from the GPU and doesn't touch the page unless you turn its developer overlay on.

## A real scene, with and without Glitchless

The scene: three.js r186, 400 meshes sharing one geometry and a standard material, one shadow-casting directional light, a 960 by 540 canvas, every mesh turning each frame. Each run draws 1,300 frames and drops the first 100. The time is everything the frame does on the main thread: moving the meshes and `renderer.render`, which Glitchless wraps to count draw calls and time the render. Five runs each way, the order swapped every run, so whichever ran second couldn't win by being warmer.

| Run | Without Glitchless: mean / 95th percentile | With Glitchless: mean / 95th percentile |
| --- | --- | --- |
| 1 | 1.22 / 1.9 ms | 1.37 / 2.3 ms |
| 2 | 1.43 / 2.5 ms | 1.22 / 2.4 ms |
| 3 | 1.33 / 2.4 ms | 1.22 / 2.2 ms |
| 4 | 1.29 / 2.3 ms | 1.12 / 2.1 ms |
| 5 | 1.16 / 2.1 ms | 1.23 / 2.2 ms |
| **Median** | **1.29 / 2.3 ms** | **1.22 / 2.2 ms** |

Runs of the same setup differ by up to 0.3 ms, and the medians differ by less than that, in Glitchless's favour this time. The honest reading is that the SDK's cost doesn't show at this scale: the 0.6 µs it spends per frame is a few hundred times smaller than the noise.

## Data sent

A minute of the same scene with Glitchless on, a level started and one of the game's own events every 5 seconds, sending to a stand-in server: 4 requests and 2.0 KB. The first batch, which opens the session, was 619 bytes and the next three about 480 bytes each. That's about 120 KB an hour of play. A game that sends more of its own events, positions for heatmaps or bug reports with screenshots sends more.

## Memory

With the scene already running, the JavaScript heap after garbage collection grew by 0.55 MB once Glitchless was on and had run for a minute. That covers the SDK's code and what it keeps: the current window's frame-time sketch, a short ring of recent frame times for hitch causes, and the events waiting to be sent. It doesn't grow with session length, because each window is summarised and sent.

## What this doesn't cover

- One machine. Run the script on the slowest device you support; the numbers that matter are the per-frame work and the A/B difference on your own scene.
- The browser SDK only. The Unity, Godot, Unreal and GameMaker SDKs do the same kind of work (time the frame, summarise every 5 seconds, send every 15) in their own languages; they aren't measured here yet.
- Optional features add work when you turn them on: position sampling for heatmaps, the developer overlay, WebMCP tools and screenshots in bug reports.

## Why Glitchless measures itself

[Glitchless](https://www.glitchless.gg/index.md) times every frame on your players' devices so you see the stutters they see, with their likely cause, and your coding agent reads the same data. The SDK is anonymous by default and players can turn it off in your game's settings. If you find a case where it costs more than shown here, the script above is the place to show it: open an issue with its output.

Ask your coding agent:

```
Add Glitchless to this game, then run packages/sdk/bench/overhead.mjs's scene check on our main level: frame time with and without Glitchless, five runs each, alternating.
```

## Frequently asked questions

### Will Glitchless slow my game down?

Not measurably in our tests: about 0.6 µs of work per frame, and a real three.js scene ran at the same frame time with and without it. Run [the script](https://github.com/glitchless-gg/glitchless/blob/main/packages/sdk/bench/overhead.mjs) on your own game to check.

### How big is the Glitchless SDK?

33.7 KB gzipped for a Three.js game, 44 KB gzipped for the full bundle with every engine adapter.

### How much data does it send?

About 2 KB a minute for a game that sends a few events of its own: one request every 15 seconds, gzipped.

### Does it run work on every frame?

A little: two clock reads, one insert into a frame-time sketch and a few counters. Summaries happen every 5 seconds and sending every 15, and sending doesn't block the game.

## Sources

- [The benchmark script: packages/sdk/bench/overhead.mjs](https://github.com/glitchless-gg/glitchless/blob/main/packages/sdk/bench/overhead.mjs)
- [The browser SDK's README and what it sends (PRIVACY.md)](https://github.com/glitchless-gg/glitchless/tree/main/packages/sdk)
- [MDN: CompressionStream](https://developer.mozilla.org/en-US/docs/Web/API/CompressionStream)
- [MDN: Navigator.sendBeacon()](https://developer.mozilla.org/en-US/docs/Web/API/Navigator/sendBeacon)
