Instant Map

Instant Map / Benchmarks

Measured, and repeatable.

These are the results of the benchmark suite in the repository, run on 2026-11-14 against version 0.1.0. Every number comes from one run of one command, and you can run the same command on your own machine.

The short version

First map image, desktop
45ms
From the start of the page load, with nothing cached.
Script run before that image
4.6ms
The loader is 7.5 KB gzipped.
Main thread per frame while dragging
1.70ms
Out of the 16.7 ms a frame has at 60 frames a second.
Same drag, low-end phone profile
7.46ms
CPU slowed six times.

In the browser

One visit is: load the page with nothing cached, move the pointer onto the map, drag it, zoom in three levels, then replace the markers with 2,000 and with 10,000. Each figure is the median of 5 visits in Chromium 158.

MeasureDesktopLaptop hidpiPhone midPhone lowUnit
First map image on screen45445591,359ms from the start of the page load, nothing cached
Script time before the first image4.65.521.634.4ms of JavaScript run by then
Waking the map4451211655ms from the first pointer move until the map can be dragged
Wake until live tiles are drawn9839831,8152,416ms, includes the hand-over from the image and downloading the tiles
Drag, slowest frames16.816.716.816.7ms per frame at the 95th percentile; 16.7 is a full 60 frames a second
Drag, main thread per frame1.704.426.317.46ms of work per frame, out of 16.7 available
Drag, slow frames0.00.00.00.0% of frames that took longer than 25 ms
Zoom, slowest frames16.816.716.816.7ms per frame at the 95th percentile
Replace with 2,000 markers29303355ms until they are drawn
Replace with 10,000 markers424071132ms until they are drawn
Blocking time, whole visit006105ms of main-thread tasks beyond 50 ms each
Script time, whole visit8272239382ms of JavaScript for load, wake, drag, zoom and markers
JavaScript memory after the visit3.83.43.13.4MB

The device profiles

The phone profiles slow the CPU and the network of the test machine. They imitate slower devices; they are not measurements on real phones.

Other browser engines

The same visit in the other engines, on the desktop and laptop profiles. CPU and network limits, script time and memory are only available in Chromium, so those rows are left out here.

MeasureFirefox, desktopFirefox, laptop hidpiWebKit, desktopWebKit, laptop hidpiUnit
First map image on screen45524442ms from the start of the page load, nothing cached
Waking the map44482930ms from the first pointer move until the map can be dragged
Wake until live tiles are drawn959963960963ms, includes the hand-over from the image and downloading the tiles
Drag, slowest frames9.09.117.017.0ms per frame at the 95th percentile; 16.7 is a full 60 frames a second
Drag, slow frames0.00.00.00.0% of frames that took longer than 25 ms
Zoom, slowest frames9.19.018.018.0ms per frame at the 95th percentile
Replace with 2,000 markers11122829ms until they are drawn
Replace with 10,000 markers38423735ms until they are drawn
Blocking time, whole visit0000ms of main-thread tasks beyond 50 ms each

Drawing a picture on the server

Time for one HTTP request to the image service, running locally with map data on the same machine. “First” is a picture that has to be drawn. “Again” is the same address a second time, answered from cache.

RequestFirst, msAgain, msSize, KB
One 512-point tile, JPEG352.664
One 512-point tile at 2×, JPEG812.8122
One 512-point tile at 2×, PNG1193.2445
First image, 960×540 at 2×, no markers1603.0258
First image, 960×540 at 2×, 50 markers1713.4283
First image, 960×540 at 2×, 400 markers2744.0334

A deployed service adds the time to fetch map data, which depends on where that data is kept. Run the suite against your own deployment with bun run bench --url https://your-domain.

The renderer by itself

The Rust renderer, compiled natively, turning vector tiles into a JPEG. Median of 30 runs, in milliseconds.

PicturePixelsRead tilesDrawEncodeTotalSize, KB
City tile512×5120.220.81.722.863
City tile at 2×1024×10240.257.76.464.8128
Metro-area tile at 2×1024×10240.259.56.366.9135
Regional tile at 2×1024×10240.231.35.937.684
Country-scale tile at 2×1024×10240.224.65.830.759
First image, city, at 2×1920×10800.399.312.3111.7232
First image, city, 400 markers, at 2×1920×10800.3102.912.2115.8251
First image, country scale1280×8000.221.25.427.092

How this was measured

Timings change from machine to machine and from run to run. Compare numbers measured on the same machine, and treat differences of a few percent as noise.

Run it yourself

One command runs the renderer, server and browser benchmarks and writes a JSON file. Another records a profile, so you can see where the time goes.

Benchmark and profiling guide on GitHub
The full result file

Terminal

git clone https://github.com/williamrogersdev/instantmap.git && cd instantmap
bun install && (cd worker && bun install) && bun run build
bun run bench