userDaniel Pcancel

2,651 Commits over 669 Days - 0.17cph!

3 Hours Ago
Update: use volatile int instead of Volatile.Read(ref long), as the latter is an expensive CAS Existing code was using non-volatile read of long, but I don't think it's safe Tests: ran perf tests
3 Hours Ago
Bugfix: fix extreme spillage in high-contention perf test Turns out I needed to do an extra spin, whoops Tests: ran unit and perf tests
3 Hours Ago
Merge: from pool_mt
3 Hours Ago
Merge: from pool_mt
3 Hours Ago
Update(tests): add 4, 8, 16, 32 task scenarios (previously was just 32) for pool perf tests Tests: ran perf tests
3 Hours Ago
Update(tests): expand AllocDeallocMTShortLived to optionally simulate busywork We're never going to be just slamming the pool(or if we do - we shouldn't as that's overhead). This makes the test closer to real world. Tests: ran perf test
4 Hours Ago
Clean(tests): consolidate pool create-spilled code into Utils.MeasureAndPrint Tests: ran perf tests
4 Hours Ago
Update: fuzzy version of pool with CircularBuffer Fastest so far, but has a tendency to spill/allocate in during very high contention AllocDeallocST - Avg: 0.63ms, Created: 0 Spilled: 0 AllocDeallocMTShortLived - Avg: 2.79ms, Created: 144(0.45%) Spilled: 169(0.53%) AllocDeallocMTLongLived - Avg: 2.94ms, Created: 0 Spilled: 0 AllocDeallocMPSC - Avg: 3.26ms, Created: 0 Spilled: 0 Tests: ran unit and perf tests
4 Hours Ago
Cherrypick from pool_mt/circularbuffer - test improvements
4 Hours Ago
Update(tests): gather and output more data about the test - track created and spilled (matters for next pool version) - more profiler markers Tests: ran perf tests
6 Hours Ago
Merge: from pool_mt
6 Hours Ago
Update(tests): add a couple more perf tests - AllocDeallocMT -> AllocDeallocMTLongLived (biases Get, then Free operations), Avg: 3.56901ms - AllocDeallocMTShortLived - fetches and returns to pool immediately (to evenly spread pressure), Avg: 3.01974ms - AllocDeallocMPSC - simulates multiple-producers-single-consumer (emulates network write thread under jobs 2) Avg: 12.20773ms All cases - 32 tasks doing 1k allocs Tests: ran perf tests
Today
Update: rewrite pool as a circular buffer with 0 locks Weirdly loses to ConcurrentBag in mono by 2x, but in CLR wins 4x >.> Going to poke around more ST avg: 0.62554ms MT avg: 9.92301ms (dafuq?!) Tests: ran unit and perf tests
Today
Update(tests): AllocDeallocMT perf test scope annotations Tests: ran perf test
Today
Bugfix: ensure Pool.Fill keeps items in use valid Tests: ran unit tests
Yesterday
Optim: rewrite Pool to use ConcurrentBag(many mutexes) instead of single mutex Fails unit tests, but not going to focus on fixing it just yet - want to make it faster first. ST avg: 0.88781ms MT avg: 3.1281ms Tests: ran perf tests
Yesterday
Update(tests): add TestMTPressure unit test Wrote it cause my ConcurrentBag based pool is misbehaving Tests: ran new unit test
Yesterday
Update(tests): pool now has a runtime switch to disable editor-only safety logic, so that perf is more apples-to-apples ST avg: 1.0358ms MT avg: 13.6264ms Tests: ran perf tests
Yesterday
Update(tests): add simple pool perf tests (ST & MT) ST avg: 1.29925ms for 10k alloc-deallocs MT avg: 21.16116ms for 1k alloc-deallocs per task, 32 tasks Tests: ran tests
Yesterday
Update: move Utils Measure routines to Facepunch.System.Tests - also make it auto-referenced Tests: compiles
Yesterday
Merge: from sanitize_specatating_players - Bugfix for NRE spam when spectate mods don't correctly setup spectating Tests: none, trivial change
Yesterday
Bugfix: ServerOcclusion - add defensive checks for suspected spectate mods The mods should be fixed, but at least it won't put servers in a weird state. Tests: none, trivial change
2 Days Ago
▆ ▍▇▆▅▌▋ ▅▌▍▄ ▄▍▅▇▇▍▌▉██▇▄▋▊▅▄▍▄▄█▇▍▆▍▋█▌▌▋▆▋▊▍▋▇▋▌▊ ▅▆▌▊▆ ▇▌▍▉▊▍▌▋▄▋▉▊▅ ▊▅▊▌▄ ▄▌▅▋ ▊▅▄▆█▅▆▍▋▉▊▊ ▍▅▋▍▆▌▍█▊ ▍▇▄▆▄ ▊▍▆▆▌▌▄▉▅▌▉▇▉▊▉ ▄▍▍▍█ ▋▄▌ ▍▌▅▌▋▄ ▋▋ ▍▍██▆▋▉ ▊▌▉ █▍▍█▌▆▇ ▍▊▍█▄▋ ▇▊ ▅▆█▋▄▇█▇▄▉▇▅▅▆▇█ ▆ ▅▌ ▆▅▌▉ ▍▌█▋█▌▆
2 Days Ago
▋ ▊▊▄▊▍▆▊ ▋▊▆▆▆▊ ▊▋▉▆▉▄ ▇▅▌█▉█▅▇ ▌▆▄▄ ▉ ▆▊▊ ▊▅▊ ▆██▄▋▆▉▇▌▉▍▅█▍▄▅▉▋▆▉▅▋▍▋█▉▅▋▄▍▍▅▇▉▇▉▍▄▄▆▄▅▇▋▌ ▄▊▅█▅ ▄▌█ ▊██▉▊▊ ▆▄ ▋▇▌▉▌▌
7 Days Ago
Merge: from objectworkqueue_valuetype_allocs - Optim: eliminate allocs from value types used in ObjectWorkQueue. Needs manual changes to be eneabled Tests: none, trivial change. Checked IL
8 Days Ago
Optim: Apply IsValidToRun for value-type ObjectWorkQueues - overrode BoatAIWorkQueue, UpdateSurroundingsQueue, UpdateMissionValidStateWorkQueue Tests: none, checked IL
8 Days Ago
Optim: use virtual IsValidToRun to avoid boxing allocs in ObjectWorkQueue.RunQueue Sad-noises-about-C#-generics, couldn't figure how to automate it Tests: none, inspected IL, no box instructions generated
9 Days Ago
Merge: from createcorpse_triggerparent_nre - Bugfix for TriggerParent not cleaning themselves up if a corpse forces it's way just before volume is destroyed Tests: ran auto tests
9 Days Ago
Bugfix: Ensure TriggerParent properly tracks forced corpse Corpses forcefully inherit trigger volumes, which doesn't properly initialize internal contents, leading to skipped cleanup when volume is destroyed. Rare bug in the wild, but consistent in auto tests. Tests: ran all PlayerMountedToArmoredVehicle_PlayerNotTargeted auto tests
9 Days Ago
Merge: from stableobjectarray_remove_dirty - Optim: maintain synchronized order of dependent data as we remove from StableObjectCache Tests: unit tests and a couple 2p sessions on Craggy with disconnects, shooting
9 Days Ago
Update: codegen Tests: none
9 Days Ago
Bugfix: fix invalid index assigned to a projectile on projectile removal from cache Copy paste mistake, happy we got unit tests Tests: ran ProjectileTests.TestConsistency - it passes
9 Days Ago
Merge: from main
9 Days Ago
Clean: consolidate player-related state cache growth to AddToPlayerCache Tests: compiles
9 Days Ago
Clean: make the code clearer around maintianing packed order Using better names for vars, easier to understand ifs and a safety assert Tests: compiles
9 Days Ago
Update(tests): add TestMovePlayer - bugfix for missing to copy an extra tick/reset point in TickInterpolatorCache.MovePlayer - added more docs to StableObjectArray Tests: ran new unit test
9 Days Ago
Optim: replace BasePlayer.SparsePlayers with PlayerCache.Objects now that indices always match packed order Tests: 2p on Craggy with disconnects of 2nd player
10 Days Ago
Update: repack player cache and dependent state as players are removed Should allow us to clean up a bit of indirection and optimize things further Tests: 2p session on Craggy with disconnects and being kicked for flying under terrain
10 Days Ago
Clean: projectiles now internally iterate over their cache rather than instance list Tests: unit tests, 2p on craggy
10 Days Ago
Update: ensure projectile stable indices are packed This simplifies code and opens up the door for better cache utilisation & simd processing, but currently savings are on the noise level Tests: unit tests + shot around player with 2 clients connected
10 Days Ago
Clean: cache span from ActiveTriggers.Objects Tests: none, trivial change
10 Days Ago
Merge: from main
10 Days Ago
Merge: from terrainkick_nre_fix - Bugfix for NREs caused by kicking players(invalidating iterators) while looping over StableObjectArray Tests: kicked self through clipping in terrain - no NREs
10 Days Ago
Merge: from main
10 Days Ago
Optim: Avoid double indirection when looking up active triggers - enabled by use of invalidating RemoveAtSwapback TriggerParent.StableIndex is only const during a frame, it now can change between frames Tests: built a 3-piece boat with a ladder, jumped around it
11 Days Ago
Clean: removed FilterInvalidPlayers now that I've validated that all kicks were grouped at end - cleaned up comments that pointed out kick locations Tests: none, trivial change
11 Days Ago
Bugfix: avoid NRE after kicking a player while iterating over a player cache - consolidated all kicks in ServerUpdateParallel to end of the method Tests: got kicked for terrain violations, no NRE
11 Days Ago
Update: StableObjectArray.RemoveAtSwapback can now optionally invalidate stable indices - added unit tests Should help us maintain packed state of dependent arrays - will start converting current use cases next. Tests: ran unit tests
11 Days Ago
Update: replace hardcoded constant with GamePhysics.DefaultMaxResultsPerQuery (same value) - also submitting missing meta file Tests: compiles
14 Days Ago
Merge: from fix_boat_no_sail - Bugfix for boats and vehicles getting stuck in open areas, effects not playing, building appearing slow Tests: unit and perf tests, built and sailed a boat on craggy