mirror of
https://github.com/Facepunch/sbox-public.git
synced 2026-02-08 13:40:58 -05:00
Added a `ChildNode` field to `TrackedObject` to enable O(1) LinkedList operations instead of O(n) Find/Remove calls. ### Isolated worst-case benchmark (reverse dependency chain): | Objects | Before | After | Speedup | |---------|--------|-------|---------| | 100 | 2.2ms | 183µs | **12x** | | 500 | 197ms | 3.8ms | **51x** | | 1000 | 1.6s | 11ms | **152x** | Also uses 50% less memory. ### Full ApplyPatch benchmark: | Size | Before | After | Change | |------|--------|-------|--------| | Medium | 962µs | 821µs | **+15%** | | Large | 20.5ms | 13.2ms | **+36%** |