Skip to content

perf: reduce stream abuse in hot paths#296

Closed
Vonr wants to merge 6 commits intohenkelmax:1.21.1from
Vonr:perf/reduce-stream-abuse
Closed

perf: reduce stream abuse in hot paths#296
Vonr wants to merge 6 commits intohenkelmax:1.21.1from
Vonr:perf/reduce-stream-abuse

Conversation

@Vonr
Copy link
Copy Markdown

@Vonr Vonr commented Apr 29, 2026

removes abuses of streams in UpgradeTileEntity#getSortedConnections and various *PipeType#canInsert implementations, which should reduce allocation rate and lead to increased performance

@henkelmax henkelmax self-assigned this Apr 29, 2026
@henkelmax
Copy link
Copy Markdown
Owner

Please target the master branch for PRs

@Vonr
Copy link
Copy Markdown
Author

Vonr commented May 1, 2026

I am unable to build the master branch as corelib 2.1.12+26.1.2 is not publically available

@Vonr
Copy link
Copy Markdown
Author

Vonr commented May 1, 2026

Considering the mod hasn't been updated for 1.21.1 in 2 years, I'll probably port this optimization into https://github.com/Vonr/invasiveopts as well.

Vonr added a commit to Vonr/invasiveopts that referenced this pull request May 1, 2026
@Vonr
Copy link
Copy Markdown
Author

Vonr commented May 1, 2026

I'll close this for now, but do remind me if you fix corelib's unavailability and I will open a PR targeting master.

@Vonr Vonr closed this May 1, 2026
@Vonr Vonr deleted the perf/reduce-stream-abuse branch May 1, 2026 07:19
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