Skip to content
This repository was archived by the owner on Dec 29, 2023. It is now read-only.

3. Asynchronous

Peridot edited this page Nov 1, 2022 · 6 revisions

Titanium do some things asynchronously to offload the main thread. Unfortunately I can't test them on Big Scale server and can't provide reliable benchmarks.

Chunk Generation

Titanium backports Paper 1.13.2 Chunk System - containing parallel Terrain Generation (1 thread per world). It gives much performance boost - server can maintain more stable (even full 20) TPS while generating terrain at the same time. Old system doing that on main thread couldn't handle that well - which occured in huge TPS drops.

New system also provide prioritising of tasks, which can be utilised using new API - chunks can now be loaded/generated with specific priority (NORMAL/HIGH/URGENT).


Entity Tracker

Titanium uses WindSpigot patch with Asynchronous Entity Tracker - which handle entities showing/hiding and some other packets correlated to them completely parallel. It can be really helpful when we have large amount of entities on the server.


Path Searches

Same like above Titanium uses WindSpigot patch which provide Asynchronous Path Searches. Path searching especially with large count of entities could be big performance issue. Titanium offload it from main thread, saving performance.


Hit Detection/Knockback Packet Handling

Again Titanium uses WindSpigot patch with Asynchronous Hit Detection/Knockback Packet Handling. It probably doesn't give significant performance boost, but can provide more "smooth" combat experience (since TPS of hit detection/combat thread can be configured).


Tab Complete (API)

Titanium backports AsyncTabCompleteEvent - it provides option for plugin developers to give async tab completions for their commands. Normal tab completions is unfortunately still handled synchronously and we can't do much about it.

Clone this wiki locally