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:
Aaron Kimbrell
2026-09-27 21:07:30 -05:00
parent c939a69240
commit ecb34840ae
3 changed files with 49 additions and 15 deletions

View File

@@ -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();