1,603 Commits over 396 Days - 0.17cph!
Merge: from steamfriends_pooling_leak
- Bugfix for a pool leak of SteamFriends with open friend list or party management
Tests: observed steam friends list in game + created a party of me, SteamFriends pool stayed constant.
Bugfix: return SteamFriends to pool
- separate out party processing to partyChanged from friendChanged loop to prevent use-after-free bugs
Tests: observed steam friends list in game + created a party of me, SteamFriends pool stayed constant.
Merge: from texttable_allocs
- Update: TextTable now can be directly pooled and supports using-dispose pattern
- Bugfix: no more NRE on inspecting text table in debugger/evaluating twice
Tests: unit tests + executed a bunch of console commands multiple times
Clean: fix formatting of debug.cs again
Tests: none, trivial change
Merge: from main
Gotta fix debug.cs formatting again
Tests: compiles in editor
Update: converting the rest of TextTable uses to explicit pooling form
That's final ones
Tests: ran a bunch of commands couple times
Clean: fix borked formatting in debug.cs
Tests: none, trivial change
Update: convert to explicit pooling all of ConsoleCommands
Accounts for about 50% of text table usage
Tests: ran a bunch of commands a couple times
Update: modify one test to validate ShouldPadColumns resetting
Tests: ran the updated test
Update: rewrite TextTable to use pooling explicitly and support using pattern
- updated unit tests
I'll need to modify all 102 places we have in code to use pooling explicitly
Tests: ran unit tests
Merge: from shoretexture_editor_cache
- editor-optim: generates a cache for shore texture buffers
Tests: ran craggy twice
Update: cache shore dist textures in editor
Tests: booted up craggy, checked files were written, booted up again - was able to load
▉▍▅█▇▍▆▌: ▋▆▉█▇ ▋▊▌▌▄▉ ▍▋▄▋▍
- ▍▇▆▌█▇ █▊▋▌▊.▍▉ ▋▌▍▆ ▄▅▋▆▆.▄▇
- ▅▅▉▊▌█▌▉▆ ▆█▍▋▇.█▇ ▌▌▋█ ▅▋▆▄▆▉▊▋▍▄▊
▋▆▍▋▆: ▌▋▌▆▍ ▅▋▆▇▌ ▆▍▊▋▌▇ █▊▆▇▌ ██▆▌▅▊
Merge: from baseplayer_serverupdateparallel
- Bugfix for not replicating npcs when UsePlayerUpdateJobs 2 is set
- Bugfix for potential NRE for rare kick reasons when UsePlayerUpdateJobs 1 or 2 is set
Tests: 2p session on Craggy with NPCs and bots and UsePlayerUpdateJobs 2
Bugfix: avoid potential NRE after player kick for terrain violations
- Rewrote logic to avoid extra IsRealNull checks - we now filter indices instead
Tests: clipped in geometry with noclip
Bugfix: player-like entities that don't support occlusion replicate correctly with UsePlayerUpdateJobs 2
Old way of filtering them allowed them to use cache, which never contained them, so they were culled.
Tests: 2p session on Craggy with UsePlayerrUpdateJobs 2 - spawned NPC and a bot, it didn't despawn
Merge: from baseplayer_serverupdateparallel
- Bugfix for IndexOutOfRange when updating player state cache
Tests: none
Merge: from main
Tests: none
Bugfix: IndexOutOfRange exception when updating player state cache
Affected both UsePlayerUpdateJobs 1 and 2
Tests: none, simple change
Merge: from baseplayer_serverupdateparallel
- Next phase of parallel workflow, can be activated with UsePlayerUpdateJobs 2
- Optim: above mode now uses tasks to send entity snapshots/destroy messages where possible
- Optim: above mode uses parallel Burst jobs for server occlusion
- Optim: above mode reduced number of occlusion checks we run, more aggressive caching of results
- Contains Network++
Tests: build tests of all modes in editor + standalone server build + unit tests + 2p session on Craggy
Buildfix: unused variable warning-as-error
Weird it didn't get detected outisde of my branch, but ah well
Tests: built all modes in editor
Bugfix: reset OcclusionCanUseFrameCache on emergency disable of UsePlayerUpdateJobs
Tests: none, trivial change
Clean: extract WaitForTasks
Tests: editor compiles
Update: review fixes #1
- fix formatting in BasePlayer-Mission
- Apply same mission fix from vanilla server flow
- Comments around EventRecord.New and AzureAnalytics.OnPlayerTick warning to avoid scripting API to keep it thread save
Got 2 more changes to make, then think it's ready
Tests: compiles in editor
Update: make batching constants servervars
- New vars are Server.SnapshotTaskBatchCount and Server.DestroyTaskBatchCount
- factored out SendEntityDestroyMessages
Tests: none, trivial changes
Bugfix: recycle filter buffers when there's no results
UsePlayerUpdateJobs 2 only issue
Tests: none, trivial change
Update: ran Generate Code
Tests: none, trivial change
Update: Network++
UsePlayerUpdateJobs 2 can send packets out of order, which needs client-side change (see CL 128169)
Tests: none, trivial change
Update: amending a comment for SendDemoTransientEntity
Finished investigating, server-demos shouldn't be a problem for multithreaded networking
Tests: none, trivial change
Bugfix: players go back to sleep on disconnect on a server with UsePlayerUpdateJobs 2
This looked scarrier than it ended up being. One concern left to investigate - looks like I'llbe able to merge it in tomorrow
Tests: 2p session on craggy with UsePlayerUpdateJobs 2
Optim: NetworkPositionTick - skip transform access
Tests: none, trivial change
Optim: inline virtual calls in SendNetworkPositions and skip transform access
Tests: 2p seesion on Craggy with UsePlayerUpdateJobs 2
Update: simplify SendNetworkPositions
Decided against parallelizing with tasks as it looks to be taking only ~0.3ms on a 350pop server
Tests: 2p session on Craggy with UsePlayerUpdateJobs 2
Clean: fix formatting
Tests: none, trivial change
Bugfix: fix failing WaterLevel tests
My ReadOnlySpan caused it, as we had hardcoded access to the global PlayerCache (which we don't use in tests).
Tests: unit tests pass
Update: rename BasePlayer.playerCache member var -> BasePlayer.PlayerCache
It was hiding the source of a bug, as func params have lower case name
Tests: compiles in editor
Clean: prefer ReadOnlySpan<BasePlayer> instead of playerCache where possible
Makes it easier to guess things at a glance.
Tests: ran all relevant unit tests(discovered WaterLevelTests are failing, will investigate next) + 2p session on craggy with UsePlayerUpdateJobs 2
Update: demote PlayersToFinalize, PlayersToValidate, PlayersToRecache from being global caches
Tests: 2p session on Craggy with UsePlayerUpdateJobs 2
Update: demote PositionChanges from being a global cache
Tests: 2p session on Craggy with UsePlayerUpdateJobs 2
Merge: from occlusion_rework
- Fix for occlusion queries not being commutative
- Reenable occlusion frame cache and expand it's use to full frame
- Server occlusion deduplicates queries
- minor API restructure (might affect mods)
Optim: ServerUpdateParallel - update player subscription groups just before we run sever occlusion update
This ensures that server occlusion frame cache is built from up-to-date occluders, and allows to save on more occlusion checks downstream in ConnectedPlayersUpdate
Tests: 2p session on Craggy with UsePlayerUpdateJobs 2
Clean: split up FinalizeTickParallel monstrosity
This is end of prep to rearrange systems for better occlusion cache reuse
Tests: 2p session on craggy with UsePlayerUpdateJobs 1 and 2
Update: add native list expand to GatherPlayersToUpdate
No effect in current case, but can prevent surprise exceptions in the future if reused
Tests: none, trivial change
Clean: minor refactor of ServerUpdatePlayerTick
Getting ready to shuffle system steps around, to re-expand occlusion cache and potentially reduce network traffic
Tests: none, trivial changes
Bugfix: avoid stale occlusion results for new occludeeds
Didn't realize UpdateSubscriptions modifies occludees - this returns a bunch of overhead. Will try to fix next.
Tests: none, trivial change