userDaniel Pcancel

246 Commits over 62 Days - 0.17cph!

23 Days Ago
Update: SoundModulation.Modulator now implements IPooled Ideally this should be a struct, since it's an 8byte object, but that would require to change too many places for now. Will create a separate task for this. Tests: local session, ran around and shot - could hear steps, impact on different surfaces
23 Days Ago
Update: MusicManager.ClipPlaybackData now implements IPooled Tests: booted in local session, no exceptions
23 Days Ago
Update: MusicClipLoader.LoadedAudioClip now implements IPooled Tests: booted in local session, no exceptions
23 Days Ago
Updating: EngineAudioClip.Grain implements IPooled Will need to explore further if it's dead script Tests: None, trivial change
23 Days Ago
Merge: from main Tests: none
27 Days Ago
Update: Replacing Pool.FreeUnsafe with Pool.Free where possible Since more IPooled usage has been added, these were left untouched by accident. Tests: none, trivial changes
27 Days Ago
Merge: from main Tests: checked all modes build
27 Days Ago
Update: Network.Message implements IPooled Technically, this should be converted to a struct instead, but the benefit/effort is not worth it right now. Also marked a static as readonly, since we never modify it. Tests: single client-server session was pumping messages succesfully. Built all modes. Tested recoridng and playback.
27 Days Ago
Update: WaterDynamics.InstanceBatch implements IPooled Also removed a bit of dead code and unused functions. Tests: checked that rowboat still produces foam
27 Days Ago
Update: PlayerReclaimEntry implements IPooled Tests: tested in local multiplayer in softcore mode
27 Days Ago
Update: ImpostorBatch implements IPooled Moved some code around and removed some always-true checks. Tests: during local game hit all new functions in the right order
28 Days Ago
Update: convert PositionLerp to IPooled Previously implemented as IDisposable, so this was a straighforward switch. Tests: ran a local 2player game, forced the client to disconnect - confirmed EnterPool got called
28 Days Ago
Merge: from main Tests: built all modes in editor
28 Days Ago
Update: fixing invalid namespace reference Tests: none, trivial change
29 Days Ago
Clean: Removing other TMP hidden warnings Turns out I added an extra csc file that I missed today. Tests: none, trivial changes
29 Days Ago
Update: fixing depr warnings in TMP Originally I excluded it from fixes as it was an external package, but it has a couple of our fixes already. Tests: none, trivial changes
29 Days Ago
Update: Review feedback Avoid creating a struct when fetching state of ParticleSystem Tests: none, trivial change
29 Days Ago
Merge: from main Tests: Build all modes
29 Days Ago
Merge: from /main/pool_reduce_freeunsafe Tests: tested on feature branch with build tests
29 Days Ago
Update: Replace Pool.FreeUnsafe with Free No funcitonal change, just reducing work in the future. Also updated relevant binary. Tests: Build a win64 client locally and built all modes in editor.
29 Days Ago
Merge: from main Tests: none
30 Days Ago
Buildfix: updating stale DLL Tests: built all modes
30 Days Ago
Update: Fixing obsolete FreeList usage Tests: none, trivial change
30 Days Ago
Update: Consolidating Facepunch.System.Tests - Cleaned up a bunch of bogus using statements Tests: Ran combined unit tests - they pass.
30 Days Ago
Merge: from main Tests: ran around, gathered, shot, built
30 Days Ago
Merge: from /main/experiment_reduce_gc_server_refresh Tests: ran new unit tests, checked Server Browser work
30 Days Ago
Merge: from main Tests: ran new unit tests, checked ServerBrowser
30 Days Ago
Update: StringView gains index and range support Added tests to cover new functionality. Added more checks for Substring operations Tests: ran new unit tests, checked ServerBrowser
31 Days Ago
Update: StringView - prefer ctor overloads instead of default args Saves a couple branches in some scenarios. - Also expanded tests to cover all ctors and arg ranges Tests: Ran new unit tests and checked server browser
31 Days Ago
Clean: Updating the docs of StringView to compare against Memory Turns out I missed System.memory during my initial research, which serves a very similar purpose. Sadly, it doesn't cover all our use cases, so we still need StringView - I've mentioned these shortcomings in the xml doc. Tests: none, trivial change
31 Days Ago
Update: Finalizing StringView - StringView's constructor now follow's Span form (source, start, len) instead of (source, start, end). Fixed updated unit tests. - Reimplemented CompareIgnoreCase via EqualityComparer<T> instead of IEqualityComparer<T> as per MS recommendation. - Annotated every public method with xml docs Test: ran unit tests - all green. Checked ServerBrowser - still good.
31 Days Ago
Update: Expanding HashEquality test for StringView To confirm that the required interface is implemented correctly and gets invoked. Tests: Ran the updated unit test
31 Days Ago
Merge: from main Tests: built all modes. Server Browser still works
31 Days Ago
Update: Reimplement tag support in server browser Fixes the break I left when running the experiment with StringView Tests: Clicked through server browser's various filter options
31 Days Ago
Buildfix: Reimplement deleted overload call from last CL Also reduced number of hashset allocations when tags are empty. Tests: Went to server browser to check Nexuses
31 Days Ago
Merge: from main Tests: Built all modes
34 Days Ago
Update: Nuking the allocating StringView.Split There's a non-allocating overload already present, so going to keep it default to help keep the 0-allocations approach. Tests: none, trivial changes
34 Days Ago
Add: unit tests for StringView and it's ignore case comparator I'll need to merge this Tests assembly with the one in unify_pool_free branch once it's merged (which-ever one goes in first) Tests: ran them - they pass
34 Days Ago
Update: Further rounding up StringView - Added ToString() (makes debugging much nicer too) - Fixed up wrong exception types - Added Length property Tests: ran new unit tests(next cl) for StringView, they pass
34 Days Ago
Merge: from main Tests: built all modes, built small house, cut a tree
35 Days Ago
Update: Replacing new occurances of obsolete Pool API with new Tests: built all configs
35 Days Ago
Merge: from main Also contains updated codegen binaries to conform with new API Tests: built all modes
35 Days Ago
Clean: use a cast instead of new expr Also dead static removal Tests: none, trivial change
36 Days Ago
Optim: StringView.Split can use user provided temp storage ServerInfo uses a pooled list to as a go-between the StringView and HashSet. This provides last noticeable change that reduces an allocation per ctor, with average going down by 1.3 (8.31 -> 7). Also reinforced empty tags to not allocate a new empty set everytime. Tests: checked ServerBrowser - tags still recognized.
36 Days Ago
Optim: Replacing ServerInfo.Region with StringView instead of string Avoids another optional allocation, avg count went down by 0.6 (8.95 -> 8.31). This looks like mostly it for clear&easy wins. Tests: Checked server browser, it displayed region tags
36 Days Ago
Update: Add ServerInfo.Protocol enum Avoids us creating a string to track which protocol to use. On average, saves about 0.6allocs (9.56 -> 8.95). We already have a similar enum on the game level, but this has the "Default" member. Tests: none, trivial change
36 Days Ago
Optim: further reduce allocs for ServerInfo Couple easy wins - Changeset is unused so removed, construct ConnectionString on demand, avoid identifying tags if already identified. Should've removed 2allocs per ctor, but data shows reduction by 3allocs on average(12.94 -> 9.56). Tests: None, trivial changes
36 Days Ago
Update: Allow StringView to implicitly convert to ReadOnlySpan This allows StringView to be friendly with APIs that Span, like int.TryParse(). It also removes 3 allocations, and weirdly my tests show a reduction of 4 allocations per ctor invocation on average. Also merging stragler tag lookup into the main loop(avoids an extra traversal and extra lambda allocation). Tests: Checked ServerBrowser, player count was sane.
36 Days Ago
Update: Annmotating ServerCacheQuery to track GC allocs Should've done it at the start but ah well. This also revealed that Task.Delay doesn't seem to be doing much - worth investigating further. Tests: took a recording during server list refresh - no errors and could see the samples displayed.
37 Days Ago
Update: Rewriting ServerInfo to use StringView for Tags This revealed a bunch of other dependencies that needed to be updated. Some of them got plugged up by string copies, some by uninmplemented StringView.Substring. Overall, seems doable, though revealed a number of shortcomings - for example, we'll need to implement our own <numeric>.TryParse(StringView) logic. On the flipside, it allows us to do String pooling a bit more aggressively in our steam library(if we decide to go that far). Tests: Opened GameServer, observed list being populated and interactible.