Skip to content

Some Enhancements #12444

Closed
xcutiboo wants to merge 2 commits into
PaperMC:mainfrom
xcutiboo:new
Closed

Some Enhancements #12444
xcutiboo wants to merge 2 commits into
PaperMC:mainfrom
xcutiboo:new

Conversation

@xcutiboo
Copy link
Copy Markdown

This pull request includes several changes focused on improving documentation, optimizing performance, and refactoring code for better maintainability. The most important changes include adding Javadoc comments to various classes and methods, optimizing string manipulation in camelCase names, and refactoring bit manipulation utilities.

Documentation Improvements:

  • Added Javadoc comments to AllocatingRateLimiter class and its methods to describe their functionality and usage. [1] [2] [3]
  • Enhanced documentation for ThreadUnsafeRandom class, highlighting its non-thread-safe nature and usage recommendations. [1] [2]

Performance Optimization:

  • Optimized stripWordOfCamelCaseName method in Formatting.java by using StringBuilder to avoid creating unnecessary intermediate strings.

Refactoring:

  • Introduced BitManipulationUtil class to centralize common bit manipulation operations, reducing code duplication and improving maintainability.
  • Updated BitStorageReader and BitStorageWriter to use BitManipulationUtil for bit manipulation tasks. [1] [2] [3] [4] [5] [6]

Thread Safety:

  • Improved thread safety and efficiency in ChunkPacketBlockControllerAntiXray by pre-initializing ThreadLocal arrays with global values.

@xcutiboo xcutiboo requested a review from a team as a code owner April 15, 2025 12:21
@github-project-automation github-project-automation Bot moved this to Awaiting review in Paper PR Queue Apr 15, 2025
@electronicboy
Copy link
Copy Markdown
Member

This generally just looks like a shotgun PR... We do not accept changes to moonrise on this repo; replacing the string manipulation inside of the generator is really not a performance concern, some util functions are maybe nice but not really pressing

@xcutiboo xcutiboo closed this Apr 15, 2025
@github-project-automation github-project-automation Bot moved this from Awaiting review to Closed in Paper PR Queue Apr 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Closed

Development

Successfully merging this pull request may close these issues.

2 participants