36 Commits over 92 Days - 0.02cph!
Merge: from profiling_improvements
- Moves core of ServerProfiler to an unmanaged DLL - this deals with various mod issues and massively reduces recording overhead (less than 10% vs previous up to 7x).
- Snapshot marks are prefixed with assembly name
Tests:
- 3 times in a row: Generated snapshot in editor on Craggy
- 5 times in a row: Generated snapshot in Release standalone server with 6k world and 190k entities (with borked and good harmony mods)
- 3 times in a row: Generated snapshot in Debug standalone server with 6k world and 190k entities (with borked and good harmony mods)
- Built Wint64 client (debug and relase); booted up release
Merge: from profiling_improvements
- This brings ServerProfiler over, our own tool to generate server profiling snapshots
- To activate, start your server with "-enableProfiler", to take a snapshot use admin server command profile.perfsnapshot (files in <root>/server/<ident>/profiler/)
Tests: Exported multiple snapshots from Editor running Craggy, Release server running 6k Procgen world and a couple from Debug server.
Merge: from remove_editor_update
- Removes last editor-only update invoke case with many invocations(saves a measly 0.1ms).
- `demo.play` accepts absolute paths
Tests: setup an industrial chain with a chest provider and a crafter and linked those up - debug vizualization worked. Loaded a demo outside of demos folder.
Merge: from remove_editor_update
Removes around 1.5ms from 6k world in the editor and fixes longstanding bugs with the decal editing.
Tests: Created a bunch of decals, modified their properties(changes visible), deleted them(no NREs), ran in game - still visible.
Merge: from vehicle_optims
Saves 0.5ms on a 6k world by avoiding iterating over unmounted mountables
Tests: On craggy drove a kayak. On 6k world confirmed that the profiling scope shrunk to 0
Merge: from profiling_improvements
Removes boxing allocations in Pool.Get and Pool.Free in Editor context.
Tests: in editor on Craggy started a normal session, couldn't see allocations in the profiler. Overrode the startup params and was able to see the overhead table printed out when invoking cmd.
Merge: from profiling_improvements
Just additional profiling annotations to fill in voids on FixedUpdate and UpdateLOD. Also editor microoptim in GamePhysics.
Tests: Rode a horse on Craggy and checked profiler for changes
Merge: from remove_editor_update
This shaves off another 5ms from editor update times on 6k world map
Tests: built all modes in editor, tested debug rendering still works on craggy and loaded a 6k proc map and checked profiler
Merge: from remove_treeentity_update
This eliminates the many calls of TreeEntity.Update in editor play mode, saves ~16ms on 6k procgen map
Tests: booted editor with swamp_a scene and shut down, booted into craggy then switched to swamp_a, added and moved trees to swamp_a, changed tree prefabs - all cases could see expected visuals.
Bugfix: Restoring kayak to version from
105500
It got missmerged into nothing(empty prefab), even though it should've automerged
Tests: Spawned it on craggy and got in on the front seat. No exceptions during loading or spawning.
Merge: from requesttrees_spike
This reduces overhead of streaming grid cells of tree impostors from 3.5m to 1m on a 4.5k server.
Tests: 2 editors(1 server, 1 client) in same session - streamed no changes, removed 1 tree then re-streamed, and streamed with disabled lazy serialization
Merge: from requesttrees_spike
- Fixes NRE when players disconnect during tree streaming (fixed by discarding those players early)
Tests: in Editor CLIENT+SERVER mode disconnected before 4k proc-map streamed in - server was gud
Merge: from requesttrees_spike
Removes the "server_requesttrees" lag spike on player connect by spreading out the processing over the next frames. Server owners can disable this via `TreeManager.EnableTreeStreaming 0` and adjust it's performance via `PlayerBudgetMS`, `UpdateBudgetMS` and `CellSize` admin servervars.
Tests: Booted Procgen 6k world - took ~3.5min to stream entire world to a player at 10 server fps, with no visual deterioration.
Merge: from item_pooling
Fixes NRE when saving a player that was killed while crafting items and returned items would stack with existing inventory items
Tests: crafted low grade fuel with 1 extra fat in the inventory, killed before finishing the craft and saved the session on the server - no NRE
Merge: from soundmodulator_leak
Fixing zipline NRE that my previous change caused. When not pooling, retail the modulators instead of trying to recreate them, since some scripts don't clear them properly.
Tests: rode the zipline twice on Craggy, then noclipped around the island to destroy sounds, then rode the zipline twice again - no NREs
Merge: from soundmodulator_leak
Fixing an assert flood on client by hiding a check behind soundpooling switch - this restores original wonky behavior.
Tests: On Craggy, flew around the island with noclip to trigger spawning/despawning of sound entities - didn't see any assertions.
Update: Audio RPC codegen
Missed in my previous commit - support for audio.enablesoundpooling.
Tests: enabled the switch at runtime, produced assertions (expected)
Merge: from soundmodulator_leak
Workarounds the AudioAmbience NREs by disabling pooling (audio.enablesoundpooling).
Tests: on Craggy shot up 20 scientists, rode a horse, cut down trees, placed 100 barricades - no uptick in pooling of sound modulators in telemetry. No old NREs triggered.
Merge: from runtime_profiling_pooling
Fixes pool telemetry flood.
Tests: hacked code to force run pooling telemetry - confirmed reduced telemetry.
merge: from soundmodulator_leak
Tests: Spawned and killed scientists in batches of 10. Previously I would get an NRE on 2nd batch, now doesn't happen after 6.
Merge: from pool_container_telem
Tests: took telem info from craggy, procgen 4.5k and saved procgen map. Built all modes in editor. Built standalone server exe.
Merge: from /main/soundmodulator_leak
Tests: spawned car_2mod_01, drove around - pool telemetry stayed stable, audio was good.
Merge: from /main/clean_dead_code
Tests: upgraded half wall - it worked
Bugfix: Don't leak pooled lists in RunInRadius<T>
Thanks for the report!
Tests: ran admin commands that would generate a leak - no more.
Merge: from main/item_pooling
This fixers the NRE on server tick (and blocker for joining).
Tests: loaded a save that consistently produced NREs - not anymore
Merge: from item_pooling
This reintroduces pooling for Items while fixing the original bug that caused their backout.
Tests: build all modes in editor, tried to repro original bug - didn't happen.
Merge: from itemcontainer_pooling
Fixes the "Double init of inventory!" assert on killing NPCs.
Tests: spawned scientist NPC, killed them - no assert logged, corpse still clothed and loot present.
Merge: from itemcontainer_pooling
Tests: built all modes in editor, booted craggy - no asserts, loaded a save on procgen - no asserts.
Merge: from fix_hitinfo_pooling
Tests: all modes build in editor, got attacked by animals then injure->kill - correct killer (and no leaks of HitInfo in Pool)
Merge: from /main/expand_ipooled
Tests: tested all modes in editor, built client and server binaries, tried 2p local multiplayer - coor loop was good.
Merge: from /main/pool_reduce_freeunsafe
Tests: tested on feature branch with build tests
Buildfix: updating stale DLL
Tests: built all modes
Merge: from /main/experiment_reduce_gc_server_refresh
Tests: ran new unit tests, checked Server Browser work
Buildfix: ifdef out ExplosionScreenBounceFade logic
Tests: built all target modes, all green
Buildfix: unexpose a variable
Leftover that I missed during cleanup, somehow tripped up the build.
Tests: Build in all modes - pass. Ran unit tests - pass
merge from Pool_Remove_FreeDynamic
Tests: ran new CompanionServerTests 10 times, all green