98 Commits over 273 Days - 0.01cph!
Merge: from parallel_validatemove
- Extra validation checks exposed via server.EmergencyDisablePlayerJobs (default to true). In case of error, shuts down UsePlayerUpdateJobs and goes back to vanilla flow
These are cheap to run and should help us track down any problems in the future.
Tests: compilation tests, unit tests and played back server demo
Merge: from parallel_validatemove
- Optim to reduce physics cast scheduling overhead
Tests: unit tests
Merge: from profiling_improvements
- New: experimental perfsnapshot_stream [Name, MainCap(MB), WorkerCap(MB), Debug] server command that streams perf data into a user-defined buffer. Limited to 256MB per thread. Stable up to 32MB, past that might fail to export.
- New: profile.quiet persistent server-var - controls whether perfsnapshot commands notify chat of incoming stutters
- Bugfix: fix snapshots failing to export in standalone(introduced yesterday to staging)
Tests: build tests, unit tests, taking snapshots in editor, and snapshots in standalone server build
Merge: from profiling_improvements
- Buildfix for tests trying to use ServerProfiler in non-server env
Tests: scripts compile in editor CLIENT mode
Merge: from profiling_improvements
- Rewrote internal storage of profiling data to use 1 buffer per thread
- Bugfix for allocation graphs not properly resetting and having gaps at the start
- Bugfix for failing to generate export in rare cases where mono runtime allocates with no managed callstack
Tests: unit tests and generating snapshots in editor
Merge: from parallel_validatemove
- Removes PlayerCache.ValidPlayers allocs
Tests: took a snapshot on Craggy in editor
Merge: from profiling_improvements
- Reduces overhead of serializing to/from ProtoBuf by not tracking BufferStream calls
Tests: snapshot on Craggy in editor
Merge: from relationshipmanager_leaks
- Server and Client-side bugfixes for pooling around RelationshipManager types
Tests: local 2 player session with flicking open-closed the contacts screen and with pooling tracking
Merge: from reduce_appmarkersellorder_allocs
- Reduces pool spillage and misses of ProtoBuf.AppMarker.SellOrder
Tests: started server on procgen map
Merge: from profiling_improvements
Tests: snapshot on craggy in editor
Merge: from listcompare_optim
- ListHashSet can now be pooled and supports Compare
- Optim Networkable.UpdateSubscriptions via ListHashSet
Tests: unit tests
Merge: from profiling_improvements
- Reduce capture size by ~19% by filtering out more methods
Tests: snapshot on craggy in editor
Merge: from parallel_validatemove
- Bugfix: GamePhysics.OverlapCapsules no longer skips 0-length-capsule queries
- Additional unit tests
Tests: unit tests + staging demo playback
Merge: from loading_entity_leak
- Fix zombie ProtoBuf.Entity objects never being returned to the pool after loading a game save
Tests: loaded craggy save, editor default procgen save and staging server save
Merge: from fix_treetoolrenderer
- Brings back tree rendering on editor start with a scene with trees without triggering database refresh
Tests: variosu editor open scenarios, various scene switching scenarios with domain reload
Merge: from ioentity_slacklevels_pooling
- Fixes IO entity spilling List<float> on save
Tests: build a couple water tanks and checked pool.print_memory
Merge: from playerinventory_allocs
- Removing extra garbage allocs from ToArray calls
Tests: equipped armor when already having one, tried to pick up an extra map with one already in the belt
Merge: from parallel_validatemove
- Clearing 2 TODOs
Tests: unit tests
▇█▉▊▉: ▋▋▌▊ ▅▆▄▉▍▌▉▍_▄█▋█▉█▆▉▌▋█▅
- █▋▉█▍▅▉▄▉▆▅▅▆█▇▉▄▍▌ ▇▅▍ ▅▍▋▆▋▄▇▅▊ ▍ ▇▊▅▇▋▉ ▊▋▆██ ▌▇ ▊▆▄▄▊█▍, ▌▄▄▉▉ ▉▊▋▇ ▉▊▇▉▅▋▉▆▍▌▉▇▅ ▅▊▉ ▇▊▅▍▊ ▍▊▊▋▅▆▊▊▋▅ (▌▌▇▊▋ ▄▆▅▌▋ ▋▅▌▍)
- ▉▋▍▇▄▆▍▉ ▋▊▊▄▋▋▄▉▌▊▆ ▋▊ █▋█▌ █▅▉▇▅▌▌▌▋, ▅▇▇▆▊▉▅▇▅▊▄▋, ▇▉▄▇▌▅▌▄▆▅▄█▉ ▉▄█ ▆▉▌▌▆▄▊▋▆▉▍▋ ▉▇▇▄ █▅▅ ▊█▍▇▋▍▋█ ▄▇▌▋▄█▋ ▄▉▌▅▉▇▍
▇▅▇▅▅: ▉▍▋▍▄▇██▍▆ ▆▄▌█▉ ▉▇▇▌▍ (▇▌▆▋▅▆, ▉▋▊▄▌▍ ▉▌▆ ▉▆▇) + ▋▇▉▍ ▋▌▆▋▆ + ▅▋▇▍▋█▆ ▋▊▊▍ ▋▋▌▊▋▌▇▆ + ▉▄▅▄▇▍ ▊█▇▇▄█ ▉▇ ▄█▄▇▅▅
- ▉▆▄▉▍▆▉▄▉ ▍▅▌█▄▆ ▆▍▋▍▍▅▄ ▌▇▊▅█▇▋ ▇▊ █▋▆ ▋▆ ▄▊▅▅█▉▌█ ▆▆▍▉
- ▅▌▉▆▇▅▄█ █▊▍▋▋▆▇
Merge: from parallel_validatemove
- bugfix for invalid transforms in the cache - fallout from previous bugfix
Tests: played back staging demo - counts as expected and no more errors about transform cache inconsistency
Merge: from parallel_validatemove
- Bugfix for null players in PlayerCache causing UsePlayerUpdateJobs to get disabled
Tests: played back staging demo - got similar results
Merge: from parallel_validatemove
- fixing one of validation checks silently passing
Tests: none, trivial change
Merge: from parallel_validatemove
- Removing extra logging
Tests: built server locally
Merge: from parallel_validatemove
- minor server demo playback bugfix
- extra debug logging for baseplayer destruction when UsePlayerUpdateJobs is enabled
Tests: build tests
Merge: from parallel_validatemove
- more debug to track down null baseplayer
Tests: local editor SERVER+CLIENT session
Merge: from parallel_validatemove
- buidlfix
Tests: build client and server in editor
Merge: from parallel_validatemove
- Adds error checking to UsePlayerUpdateJobs 1 mode and graceful disable to avoid crashes to help with investigation
Tests: ran parallel mode in editor on craggy with a couple debugger-forced emergencies
Merge: from players_cmd_clean
- Removes obsolete columns
Tests: ran the command in a local editor session
Merge: from profiling_improvements
Tests: took a snapshot in editor
Merge: from minigun_audio_fix
- Fixes minigun audio beign stuck on Client after releasing the fire button
- Fixes minigun effects not replicating to other players
Tests: local 2 player session with each player firing minigun in various patterns.
Merge: from item_allocs
- Simplifies stacking logic to be cheaper and get rid of potential allocation
Tests: various stacking scenarios from belt to inventory with wood stacks(incomplete stacks, full stack + incomplete, full stack only)
Merge: from item_allocs
- Fixes BufferList not able to sort when it's not full
- removes some from Item.MoveToContainer
Tests: moved and stacked items in the inventory while checking profiler
Merge: from growablegenes_allocs
- Remove allocs from GrowableGenes
Tests: local in editor, spawned a planter box, filled it with seeds while monitoring Profiler stream
Merge: from treemanager_oob_nre
- Fixes NRE caused by trees close to the edge of the world
Tests: throw away unit tests that sampled edges of the tree manager's grid
Merge: from active_tooltip_nre
Logs to help track down mystery NREs.
Tests: booted into bootstrap scene
Merge: from baseplayer_dispose
- Fixes the error log spam on staging
Tests: local 2 player session, 2nd player disconnected, triggered GC - no errors
Merge: from parellel_validatemove
- Full conversion of player WaterInfo caching over to jobs
- TerrainMap now uses NativeArray instead of managed array
- expanded unit tests
- new ServerDemoProcessor that tracks water results checks (in/out of water counts)
Going to start testing on staging and monitoring the impact
Tests: ran all the new or updated unit tests, made sure builds passed locally, during dev used server demos to validate stats.
Merge: from texttable_allocs
- Layout improvements and NRE fix for 0 rows
Tests: unit tests + running filtered status command to force 0 rows
Merge: from texttable_allocs
- Fixing allocs in Server::playerlistpos
Tests: ran unit tests and stewed on Aux2 for a week
▊▄▆▇▉: ▉▋▄▅ ▋▆▊▆▋▅▅_▌▇▋█▆▋▍_▅▄▌
- ▉▅▇▋▍▄▉▅ ▉█▊▌▍▇▌, ▌▉▇▆▉█ ▊▍ ▇█▍█▄ ▊▍▄▅▆ ▋▄▊▊█▋▅ ▅▅▅▊▉▄
▇█▊█▅: ▊▌▉█, ▍▅▄▆▍▊█ █▊██▉▆
Merge: from concurrentquueue_leak
- Fixes an edge-case on high-pop servers that can cause a 10MB/s garbage allocation rate
Tests: validated fix works via synthetic test, then had a 2-player session on craggy to validate network traffic works as intended
Merge: from eventrecord_allocs
- Reduces the number of allocations caused by our server-side analytics
- New "analytics.small_buffer_send_limit" persistent ServerVar to reduce task scheduling overhead. Set -1 to return original behavior.
Tests: ran existing analytics unit tests, booted server in editor.
Merge: from parallel_validatemove
- Fixers a couple rare bugs leading to missing data from FullServerDemo recordings
- More work on BasePlayer.SErverUpdateParallel, still disabled
- Editor-only: Added a couple unit tests
- Editor-only: ServerDemoPlayer - disable error spam during demo playback, improve log format
- Editor-only: ServerDemoPlayer - automatically authenticate connections during demo playback
Tests: played back demo from staging server, recorded a couple new demos in local editor
Merge: from profiling_improvements
- makes the Linux binaries compatible with more distros (Ubuntu 20.04, Debian 12)
Tests: ran in Ubunti 20.04 and 24.04 via WSL. Took snapshots and opened them in perfetto.
Merge: from profiling_improvements
- Fixes ProfilerBinViewer to display all available threads and fix invalid callstack depth calculation
- Fixes a bug that would prevent json from being generated on busy servers
- Fixes a bug with timelines being very-slightly out of sync
- Optim/Bugfix to filter out all constructors from being profiled
Tests: a lot of exports in the edittor and a bit of forced "bad" cases
▍▌█▇█: ▅▅▇▍ ▋▅▊▄▊█_▌▋▌▊█▌▊▋▌▉▋_▄▅▆▇▆▉▉
▄▍▅▇▅▌ ▆▇▇ ▆▌▉█▅▊ ▊▋▅▌▌▉ ▍▇▅▊▌▊▅
▍▅▊█▉: ▅▄▋▇ █▉▍█ ▅▉▇▌▆▄ ▉▇▉ ▉ ▅▇▋▍▄, ▊▍▊ ▇▅▄█ ▅▊▇▍▇▅▍ ▇▆▉▍▇█ ▇▍▆█▋▅ ▌▇▊█ ▅▌ ▅▄▄▇▌▆▌ █▊▇ ▊▉▇▋█▇.
Merge: from parallel_validatemove
* Modifies Full Server Demo recording to grab more data + timestamps per packet
* Adds editor-only "DemoServer" server backend that we can use in editor to play back full server demos. Switch editor to ServerMode and put path in GameSetup object
* New server-side batch-update of players routine - disabled by default as it's not validated yet. Controlled by `server.UsePlayerUpdateJobs`
* Added GamePhysics batch versions of OverlapCapsule and OverlapSphere
* Couple unit tests to check Water's batch queries against non-batched versions
Tests: A lot of server demos recorded and played back in the editor doing core activities (looting, harvesting, interacting). Made sure standalone server and client builds locally.
Merge: from profiling_improvements
Further reducing overhead by recording 25% less data overall (based on 350p release server snapshot)
Tests: Took a snapshot on Craggy in Editor
Merge: from hackweek_serverprofiler_memory
- Records allocations from all threads
- Displays allocations on separate thread tracks + a graph of total allocations per thread
- Allocations now have last/current method, allocated type and size in the mark's "arguments" - see "current selection" in perfetto
- Allocations now also duplicate in the executing thread to make it easier to spot where exactly in the method it was allocated.
- Graphs of working set and virtual set memory for the entire process
Tests: multiple snapshots in editor on Craggy, single in standalone debug linux server via WSL on 3k procgen map, single in standalone release windows server on 3k procgen map with a harmony mod
Merge: from profiling_improvements
Further exclude small methods/utility classes that are fast 95% of the time.
Tests: Took a snapshot on a defualt ProcGen map in Editor(Client+Server). ~13% uncompressed json reduction.