Performance
Honest version: the scripts are not the heavy part. The map is.
The map
Section titled “The map”[the_apocalypse_project] is a whole-map conversion on top of Los Santos, around 166 ymaps and an MLO. A lot of its ymaps have streaming extents of kilometres, much bigger than the props inside. So the engine thinks half the map is in range at once and everything streams in at the same moment around a spawning player. That’s where the pool pressure comes from.
The real fix is in the maps: tighten the inflated extents in CodeWalker, with a safe margin. Worth more than every pool line below.
Pool sizes
Section titled “Pool sizes”server.cfg raises some pools with increase_pool_size (the modern way, gameconfig.xml is not honoured anymore):
increase_pool_size "Building" 500increase_pool_size "StaticBounds" 2000increase_pool_size "EntityDescPool" 5000increase_pool_size "TxdStore" 8000increase_pool_size "FragmentStore" 4000increase_pool_size "fragInstGta" 800increase_pool_size "Object" 800# + interior/portal/occlusion, LightEntity, AttachmentExtensionThese are modest on purpose, not the max. Maxing them costs memory on every client and Building way above ~500 causes its own problems.
Keep set onesync_population false. Ambient population fills exactly the pools you can’t raise.
Zombies
Section titled “Zombies”The zombie caps already scale down by themselves:
- server frame time over
Zombies.Net.perfBudgetMs(70) cuts the cap, down toperfMinFactor - total entities between
entitySoftandentityHard(1400 / 1900) cuts it, and over hard the farthest walkers go - a player under
fpsLowFPS gets fewer walkers near them
Tune perfBudgetMs from the frame average /znet shows on an idle server. If your server is just slower, the default will cut zombies all the time.
On the client side Streaming.PoolGuard.clientPedLimit (180) stops new walker peds before the ped pool gets full, and an emergency cull removes corpses first, then the farthest walkers.
Measuring
Section titled “Measuring”resmon 1 -- client, per resource msprofiler record 500 -- then profiler view/znet -- zombie caps and server frame/pools -- client ped poolThere is no /bsperf, the resources don’t keep internal timers. Use resmon.
In October I went through every client script. Nearly every per-frame loop is already gated (it sleeps 250-1000 ms when idle). The few that always run per frame are things the engine needs every frame (hiding HUD parts, population density, blackout lights). If you see one of ours high in resmon while idle, that’s a bug, tell me.
bs19.org · Privacy · Terms · Cookie settings