ModernUO/Projects/UOContent/Network
Kamron Batman ff7e70258e
perf: size the auto-denylist cap to a Dictionary capacity
65,536 sat just past a resize boundary. Dictionary<UInt128,long> grown from
empty steps 36,353 -> 75,431 -> 156,437 (ExpandPrime doubles and takes the
next prime), so a 65,536 cap allocated capacity 75,431 and stranded 9,895
slots at 52 bytes each -- 515 KB reserved and unreachable.

156,437 fills a capacity exactly: 2.4x the headroom for ~8 MB, no wasted
slots. Measured Entry layout is 48 bytes (4 hashCode + 4 next + 8 alignment
padding for UInt128 + 16 key + 8 value) plus a 4-byte bucket int.

The binding constraint is the sweep, not memory, since it is O(n) on the
loop. Measured full sweeps: ~2 ms at 156,437, ~6 ms at 324,449, ~26 ms at
968,897 -- so a million-entry cap costs 72 MB and a three-tick stall when a
flood's entries all lapse together. The remark records the curve because
maxEntries is operator-facing.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-13 21:54:44 -07:00
..
AutoDenylist perf: size the auto-denylist cap to a Dictionary capacity 2026-08-13 21:54:44 -07:00
Blocklist refactor: drop the deprecated allowlistFiles key from blocklist config 2026-08-13 21:27:11 -07:00
CrowdSec docs: tighten the comments across the ban subsystem 2026-08-13 21:19:50 -07:00
Firewall docs: tighten the comments across the ban subsystem 2026-08-13 21:19:50 -07:00
LoginAllowlist perf: stop the auto-denylist re-sweeping for every rejected address 2026-08-13 21:42:33 -07:00
ManualAllowlist refactor: drop the deprecated allowlistFiles key from blocklist config 2026-08-13 21:27:11 -07:00
Packets perf(login): run password hashing on a parked worker thread (#2566) 2026-08-09 00:13:34 -07:00
BanExemptions.cs refactor: rename FileAllowlist to ManualAllowlist 2026-08-13 21:26:06 -07:00
ContainerGridPacketHandler.cs fix: Bumps deps. Updates copyrights (#2353) 2026-03-05 19:36:54 -08:00
EntityPackets.cs fix: Bumps deps. Updates copyrights (#2353) 2026-03-05 19:36:54 -08:00
FreeshardProtocol.cs fix: Bumps deps. Updates copyrights (#2353) 2026-03-05 19:36:54 -08:00
GameServer.cs fix: Bind the login auth id to its account and drop the redundant verify (#2564) 2026-08-08 09:25:42 -07:00
GatewayServer.cs feat: Moves network related events to UOContent using code generation (#1945) 2024-09-06 16:57:10 -07:00
MapUO.cs fix: Bumps deps. Updates copyrights (#2353) 2026-03-05 19:36:54 -08:00
NetworkCommands.cs fix: Adds command help, webpage, and fixes issues with other commands (#1669) 2024-02-10 00:19:19 -08:00
ProtocolExtensions.cs fix: Bumps deps. Updates copyrights (#2353) 2026-03-05 19:36:54 -08:00
UOGateway.cs fix: Bumps deps. Updates copyrights (#2353) 2026-03-05 19:36:54 -08:00