Skip to content

refactor: implement zero-allocation callback pipeline - #20

Merged
protheeuz merged 1 commit into
mainfrom
refactor/zero-allocation-pipeline
May 6, 2026
Merged

refactor: implement zero-allocation callback pipeline#20
protheeuz merged 1 commit into
mainfrom
refactor/zero-allocation-pipeline

Conversation

@protheeuz

Copy link
Copy Markdown
Member

Summary

This PR transitions the Satset networking library to a zero-allocation decoding architecture. By moving from a table-based return model to a direct callback-dispatch system, we've eliminated per-packet heap allocations on the hot path.

Technical Implementation

  • Serialization: Refactored SchemaCompiler and Serializer to support callback-based decoding. This bypasses the need for temporary object creation during high-frequency data throughput.
  • Luau Optimization: Removed manual localizations in favor of direct global access, allowing the Luau compiler to emit FASTCALL and Global Import opcodes natively.
  • Core Improvements: Updated internal requires to use relative string paths, improving compatibility with various Rojo and Wally project structures.
  • Type Safety: Hardened nullability checks and corrected several documentation typos in the core types module.

Changelog Entry

  • [Core]: Implementation of callback-based decoding pipeline. Achieves zero-allocation throughput and improves CPU performance by ~3x.

Type of Change

  • Performance Optimization
  • Refactor

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.

@protheeuz
protheeuz merged commit 9e9bcaa into main May 6, 2026
5 checks passed
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.

1 participant