mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2026-10-02 10:53:44 +00:00
Opening a zone the first time built its terrain, scene objects and manifests and ran ImageMagick on the web thread, stalling the dashboard for seconds. - Workers: the shared pool plus Workers::Reply (answer at once when built, else from a worker via Web::Defer). - terrain_chunks/terrain_layers/scene/paths/scenery/flairs (world3d, property and showcase routes) and terrain textures go through it; results are built once in OnceCaches, the .raw is read once per zone for chunks, layers and flairs, deflated bodies are cached thread-safely. - ImageMagick conversions are deduplicated and written under a temporary name. - Workers don't query the CDClient, read settings or call mongoose: ZoneTable, render components, flairs, object names, LOT kinds and terrain texture names are read at startup; client_location is read once; base64 is plain C++. - Logger writes one line at a time (mutex; localtime's buffer is shared). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
19 lines
656 B
C++
19 lines
656 B
C++
#pragma once
|
|
|
|
struct PlayerPositions;
|
|
|
|
/**
|
|
* The live 3D world view (/world3d): a zone's terrain, scene objects, paths and spawn points with players moving on
|
|
* it, plus replays of where players went (position samples kept for position_history_days, staff only) and a
|
|
* timelapse of the economy map events per day.
|
|
*/
|
|
namespace WorldView {
|
|
void RegisterRoutes();
|
|
|
|
// Read the CDClient data the zone data builders need (at startup: they run on worker threads)
|
|
void Preload();
|
|
|
|
// A world server reported its players' positions: keep some of them for replays (throttled, written in batches)
|
|
void RecordPositions(const PlayerPositions& positions);
|
|
}
|