Skip to content

perf(core): dispatch shielding and telemetry instrumentation - #22

Merged
suckserberg merged 4 commits into
mainfrom
perf/telemetry-and-dispatch
May 25, 2026
Merged

perf(core): dispatch shielding and telemetry instrumentation#22
suckserberg merged 4 commits into
mainfrom
perf/telemetry-and-dispatch

Conversation

@protheeuz

Copy link
Copy Markdown
Member

Pull Request

Summary

This pull request adds debug telemetry to the batching pipeline and improves the safety of packet listener execution. It introduces decodeToTable to enforce a clean API boundary when deserializing network payloads.

Technical Implementation

  • Batcher: Added poolHit, poolMiss, and poolReject counters to track exact-size buffer pooling behavior. Implemented deferExactBufferRelease to release buffers after the RemoteEvent fires. Moved batch processing to inline callbacks to prevent intermediate array allocations.
  • Serializer: Added decodeToTable to construct state dictionaries safely before they reach public listeners.
  • Packet: Replaced the previous zero-allocation inline dispatch with decodeToTable. Wrapped all listener executions in pcall to prevent malformed payloads from halting the receive loop. Added GC tracking hooks.
  • Channel: Removed inaccurate zero-allocation claims from inline comments to reflect the new allocation-aware pipeline.

Changelog Entry

  • Core: Implementation of batcher telemetry and protected packet dispatch. Improves memory visibility and listener safety.

Type of Change

  • Feature
  • Bug Fix
  • Performance Optimization
  • Documentation Update
  • Maintenance / Chore

Verification and Standards

  • I have adhered to the Development Patterns.
  • I have verified that all CI/CD linting and formatting checks pass.
  • I have confirmed the changes within a Rojo-supported environment.
  • I have updated the technical documentation for any API or architectural changes.

@suckserberg
suckserberg self-requested a review May 25, 2026 10:58

@suckserberg suckserberg left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM👍

@suckserberg
suckserberg merged commit de28492 into main May 25, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants