Skip to content

Optimizations#294

Open
ItsNature wants to merge 7 commits into
version/1.2.8from
optimizations
Open

Optimizations#294
ItsNature wants to merge 7 commits into
version/1.2.8from
optimizations

Conversation

@ItsNature

@ItsNature ItsNature commented Jun 19, 2026

Copy link
Copy Markdown
Collaborator

Overview

Description:
Reduces overhead in frequently called code by avoiding redundant allocations and computation. No behavioral changes.

Changes:

  • EventBus#post: lazily allocate the throwables list.
  • Packet broadcasting: pack/serialize each message once per broadcast instead of once per recipient.
  • Option#getKey: cache the joined key instead of recomputing it per call.
  • ApolloWorld#getPlayers, Apollo#getRecipientsFrom, TeamModuleImpl, NametagModuleImpl: streams -> loops.
  • NetworkOptions#sendOption(s): build the message once per broadcast.

Review Request Checklist

  • Your code follows the style guidelines of this project.
  • I have performed a self-review of my code.
  • I have tested this change myself. (If applicable)
  • I have made corresponding changes to the documentation. (If applicable)
  • The branch name follows the projects naming conventions. (e.g. feature/add-module & bugfix/fix-issue)

@ItsNature ItsNature added the type: Enhancement Feature improvement or addition label Jun 19, 2026
@ItsNature ItsNature mentioned this pull request Jun 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: Enhancement Feature improvement or addition

Development

Successfully merging this pull request may close these issues.

1 participant