Skip to content

Performance improvements with the help of Claude - #4472

Merged
Mag-nus merged 4 commits into
ACEmulator:masterfrom
Mag-nus:performance-improvements-1
Aug 3, 2026
Merged

Performance improvements with the help of Claude#4472
Mag-nus merged 4 commits into
ACEmulator:masterfrom
Mag-nus:performance-improvements-1

Conversation

@Mag-nus

@Mag-nus Mag-nus commented Aug 1, 2026

Copy link
Copy Markdown
Member

This has 5 minor performance improvements found with the help of Claude

In networking, check for packetLog.IsDebugEnabled before the calls.

  • packetLog is disabled in almost all servers. This removes the boxing cost and GC pressure it adds for var/struct types with structured logging.
  • Don't clear the array when its released back to the pool. We're not leaking any secrets here. It's an AC server. We can skip this cost.

Polygon walkable_hits_sphere included some test code that was ported over from the client. This code was likely code added to the client with a break point so that a developer could test if the two functions ever mismatched. Not needed for us.

Transition calls init in its ctor, no need to explicitly call it again. Saves re-creation of a few objects.

Creature_BodyPart and Monster_Melee referenced a few biota properties that were never used. Querying a property incurs a slight cost (lookups, rwLock, etc...)

@Mag-nus Mag-nus changed the title Performance improvements 1 Performance improvements with the help of Claude Aug 1, 2026
@Mag-nus
Mag-nus merged commit c2ed2ea into ACEmulator:master Aug 3, 2026
2 checks passed
@Mag-nus
Mag-nus deleted the performance-improvements-1 branch August 3, 2026 11:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants