Improve performance in production setup (#15594)

* build cached content files for mobile during gulp build

* load already cached content files during startup

* add option for mongoose to define minPoolSize

* cache client index.html for 10 minutes. Improves initial load times

* add option to auth to use lean version of user doc

* add a way to produce a heapdump from the command line

* fix lint
This commit is contained in:
Phillip Thelen
2026-01-26 18:45:44 +01:00
committed by GitHub
parent 3d93390a7a
commit cdf8556fd6
9 changed files with 474 additions and 141 deletions
+1 -10
View File
@@ -1,21 +1,12 @@
import nconf from 'nconf';
import { langCodes } from '../../libs/i18n';
import { serveContent } from '../../libs/content';
import { serveContent, ANDROID_FILTER, IOS_FILTER } from '../../libs/content';
import { authWithHeaders } from '../../middlewares/auth';
const IS_PROD = nconf.get('IS_PROD');
const api = {};
const MOBILE_FILTER = ['achievements', 'questSeriesAchievements', 'animalColorAchievements', 'animalSetAchievements',
'stableAchievements', 'bundles', 'loginIncentives', 'pets', 'premiumPets', 'specialPets', 'questPets',
'wackyPets', 'mounts', 'premiumMounts,specialMounts,questMounts', 'events', 'dropEggs', 'questEggs', 'dropHatchingPotions',
'premiumHatchingPotions', 'wackyHatchingPotions', 'backgroundsFlat', 'questsByLevel', 'gear.tree', 'tasksByCategory',
'userDefaults', 'timeTravelStable', 'gearTypes', 'cardTypes'];
const ANDROID_FILTER = [...MOBILE_FILTER, 'appearances.background'].join(',');
const IOS_FILTER = [...MOBILE_FILTER, 'backgrounds'].join(',');
/**
* @api {get} /api/v3/content Get all available content objects
* @apiDescription Does not require authentication.