mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2026-10-02 10:53:44 +00:00
perf(dashboard): UGC page stays fast with tens of thousands of creations
The UGC page ran a CDClient query per distinct car or rocket combination to find each preset's sample (thousands on a large server), re-read the car and rocket build types from the CDClient on every list request, and grouped every build into assemblies again on every page, sort or filter change of the Cars and rockets list. The modules and icon kinds are now read once at startup on the main thread (UgcRoutes::Preload), so the web threads never query the CDClient (which they must not), a combination's kind comes from that table, and the grouped assemblies are shared by the requests of 15 seconds. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -443,6 +443,7 @@ int main(int argc, char** argv) {
|
||||
{
|
||||
const auto start = std::chrono::steady_clock::now();
|
||||
ClientAssets::Preload();
|
||||
UgcRoutes::Preload();
|
||||
PreloadZoneData();
|
||||
Scenery::Preload();
|
||||
WorldView::Preload();
|
||||
|
||||
Reference in New Issue
Block a user