2,859 Commits over 700 Days - 0.17cph!
Optim: ServerCachePlayerInfo - don't cache isRunning
Time to clean up all the extra args everywhere, having 10 param funcs is no bueno
Tests: consistency tests
Optim: ServerCachePlayerInfo - don't cache onground and isflying
Tests: ran unit consistency tests
Bugfix: accidentally used ducked instead of ducking modelstate, whoops
Tests: ran consisntecy unit tests
Optim: ServerCachePlayerInfo - stop caching isDucking
Tests: AH consistency unit tests
Optim: ServerCachePlayerInfo - don't cache isOnLadder
Tests: ran AH consistency unit tests
Bugfix: missed a couple places where ModelState.Blocking is updated
Tests: none, trivial change
Clean: fix up formatting crimes in BasePlayer-SaveLoad.cs
Tests: none, trivial change
Update: duplicate ModelState.flags and ducking properties into their own arrays, keep them in sync with incoming model states
Will allow me to removed caching of 5 properties in ServerCachePlayerInfo
Tests: booted craggy
Optim: ServerCachePlayerInfo - don't cache IsCrawling, it can be deduced from PlayerFlags
Tests: ran speed consistency unit test, ran around craggy, crawled while wounded - all's gud
Clean: remove JobHandle IsValid extension
This was a workaround for a Unity issue that was fixed in 6.3.14f1
Tests: none, trivial change
Optim: ServerCachePlayerInfo - only recache positional state if position changed from last call
Tests: ran around on craggy, sawm, crouched. retried connecting couple times
▊ ▋█▄▆██ ▉▊▊▊▅▍▉▋▅▇▆▇▆▋█▍▆▋▉▇▇ ▍ ▄▆▋▋▆▆ █▄▍▇▄▇█▍▌ ▊▋▌██▆ █▅▊▇▉ ▆▌▆▇ ▊▄▄▉▊▇▌ ▇▋▇▆▄▇▌▆▍▇█▅▉▍ ▊▍▍ ▋▉▄▄█▊ ▍▊▌▊▊▍
Optim: ServerCachePlayerInfo - avoid transform access when recaching player center
Tests: none, trivial change
Bugfix: separate position-dependent and other player state caching
It was possible that for a couple frames cached player state would be incorrect
Tests: none
Merge: from server_player_refreshcolliders_optim (previously jobs3_...)
- Optim: avoid water queries when refreshing connected player colliders
Tests: On Craggy, ran around, sawm and crouched - could see gizmo size change
Optim: use cached swimming results instead of new water queries when refreshing player's collider
Tiny savings(~1 micro per player), but every bit helps
Tests: ran around craggy, went swimming, crouched - saw collider gizmo size change
Clean: refactor ConnectedPlayersUpdate into batched blocks
Makes it easier to see at a glance where our time is spent in profiling snapshots
Tests: ran around on craggy
Merge: from pool_mt
- Bugfix: avoid extensive spills/misses with new Pool
- Clean: UseMutexPool is now correctly showing 2 entries in console autocomplete
Tests: unit tests, booted into Playground and Procgen 2k worlds and checked print_memory
Clean: redefine UseMutexPool variable as separate ClientVar and ServerVar instead of merged ConsoleVar
- Codegen
Former doesn't show 2 options in console
Tests: booted into craggy and checked suggestions
Bugfix: add a fuzzy check to prevent Pool read-write head desync causing lots of misses+spills
Surprisingly, it's about 15-25% faster than before fix in MT scenarios, but expectedly slower by 10% in ST (still faster than og Pool)
https://files.facepunch.com/danielprihodko/1b1011b1/WyJ3SUYrMB.png
Tests: ran SpillageRunaway unit test 10 times, booted into Playground 4 times - no debug messages about misses/spills. botted 2k procgen world and checked print_memory
Update(tests): change spill tests assertions to permit writed head to run ahead of read head
Tests: ran unit tests
Update(tests): add a synthetic test to cause pool spill runaway
- moved other spillage tests to Unit namespace and merge into 1 test
Made it to fail consistently at 4 consume threads
Tests: ran tests
Debug: add a bit of logging to track down why fuzzy Pool can spill aggressively
- added a couple temporary perf tests to stress test it
Tests: botted into Playground, ran my temp tests
Merge: from relax_stringview
Merge to cleanup plastic branch view, no actual files changed
Merge: from playervoice_allocs
- Optim: PlayerVoice processing no longer requires allocations
- Clean: removed most deprecated or generic ClientRPC/ServerRPC calls, now relying fully on our RPC source generator
- Update: Rust.SourceGenerator supports ReadOnlySpan and similar types
Tests: unit tests, 2p session on Craggy with voice going both ways
Bugfix: StringView - fix invalid substring offset calculation in EndsWith overloads
Tests: unit tests pass, empty bind command works
Update(tests): add unit tests that can catch invalid substring calls in StartsWith/EndsWith
Tests: ran them, EndsWith fail (as reported)
Clean: remove a missed todo note
Not worth the effort to chase it, current code is okay
Tests: none, trivial change
Merge: from client_clientrpcs
Clean: removed generic ClientRPC methods
- rewrite ClientRPCPlayerList into ClientRPCList
All except for 2 calls now rely on Rust.CodeGen
Tests: compiles
Clean: rewrite all obsolete ClientRPC calls into RpcTarget form
- removed all obsolete ClientRPC calls
Tests: editor compiles
Optim: avoid buffer alloc on recieving player voice packet
Tests: 2p on craggy, tested voice in both directions
Clean: Get rid of all manual BaseEntity.ServerRPC calls, rely on codegen instead
- rewriten some calls to not rely on generic ServerRPC
- Rust.SourceGenerator.Rpc from 9db9e963 (not merged to main yet) - has support for all NetWrite.Write types
Tests: compiles
Merge: from main
Need to rebuild Rust.SourceGenerator
Merge: from stringview_indexof_fix
Bugfix: StringView.IndexOf - prevent skipping a character if we had to abour a sequence match
This affects Contains, Replace and IndexOfAny as well, as they depended on IndexOf
Tests: ran unit tests, they pass
Update(tests): add a unit test case for StringView.IndexOf failing edge case
Tests: test fails as expected
Bugfix: StringView.IndexOf - handle seraching for empty same way as string
- amended unit tests to enforce mathicng results check
Tests: ran unit tests
Update: StringView - add StringOptions overloads to StartsWith, EndsWith
- added unit tests to cover new methods
Tests: ran unit tests
Update: StringView now supports StringComparisons when comparing to other StringViews
- expanded unit tests to cover this
Tests: ran unit tests
Bugfix: StringView - ensure defaulted string view can compare to empty string as equal
- left a note about string.Equals(object) not recognizing StringView
- reorganized comparisons in Ranges test to make them pass
Tests: ran unit tests
Update(tests): add a bit more coverage to IndexOf and IndexOfAny null tests
Tests: ran tests