Speed & performance
BerryRTP is built to make teleports feel instant while costing your server almost nothing.
How it's fast
- Ready spots. Each world keeps a stock of safe spots (10 by default) found ahead of time. When a player runs
/rtp, they get one straight away. It's re-checked right before use in case someone built or claimed there. The stock is saved when the server stops, so teleports are instant straight after a restart too. - Ready terrain. Each ready spot's chunk is generated when the spot is found, so the landing chunk is never generated while a player waits.
preload-radiuscan generate more around it if your server is slow at generating. - Search during the warmup. If the stock is empty, the search starts as soon as the warmup does, so it's usually done before the countdown ends.
- Oceans skipped for free. Blocked biomes are skipped using the world seed before any terrain is generated. Without this, most failed tries in a normal world are oceans, and each costs seconds of generation.
- Players first. Chunk loads for a waiting player jump to the front of the server's queue. Background work runs at the lowest priority, so it never slows a teleport down.
How it's light
- Almost nothing runs on the main thread. Chunks load asynchronously, picking spots and the biome pre-check run on a background thread, and the only main-thread work is reading the few blocks where the player will land (on Folia, on that chunk's own thread).
- No per-tick tasks. Warmups react to the move and damage events and only update once a second.
- Messages are parsed once and reused: a countdown, title or menu line costs a lookup instead of a full parse, even when the numbers in it change.
- Spamming
/rtpis cheap. "Already teleporting", cooldown and in-combat replies go out at most once a second per player, and the busy check runs before anything else. - Nothing stays loaded. A ready spot is just a remembered location; its chunks unload like any others.
- The stock is topped up one spot at a time, with a pause in between, and only when it's below its target. When the stock is full, BerryRTP does nothing in the background at all.
- Open menus only resend the slots that changed.
Measured
With spark on a Paper 26.3 server (i7-12700KF, 2 GB) during an /rtp test, BerryRTP used 0.09% of the server thread. On a small 4-core test server, 5 players spamming /rtp for 30 seconds cost 0.30%, with no lag warnings.
Command to landing on a small test server running Paper 1.21.8 (your server will likely be faster):
| Situation | Command to landing |
|---|---|
| Ready spot in stock (default) | 0.1 – 0.3 s |
| Already-explored area, no stock | about 0.1 s |
| Brand-new terrain, no stock, no warmup | 3 – 11 s (one chunk generated) |
| Default 5 s warmup, stock empty | about 5 s (the search hides inside the warmup) |
Tuning
defaults:
ready-spots: 10 # per world, 0 = off
preload-radius: 0 # off; 1 = 3x3 chunks, 2 = 5x5 (max 8)
performance:
refill-delay-seconds: 2 # pause between background searches
debug: false # log every search's time
| If... | Try |
|---|---|
Players spam /rtp and sometimes wait | Raise ready-spots (e.g. 20) or lower refill-delay-seconds |
| Your server is low on CPU | Raise refill-delay-seconds (e.g. 10) and lower ready-spots |
| Players see terrain loading in after landing | Set preload-radius to 1 (costs a little main-thread time per spot) |
| You want to know how long searches take | Set debug: true and watch the console |
Storage
The ready-spots list itself is tiny: data/ready-spots.yml is about 500 bytes for 30 spots. The only terrain generated ahead of time is each spot's own chunk (more with preload-radius), the same as a player exploring there.
Pre-generating your world
If you want every single search to take milliseconds, pre-generate the RTP area with a plugin like Chunky (e.g. a radius matching your max-radius). It's optional; BerryRTP is fast without it.