Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Server Performance boost #158

Merged
merged 5 commits into from
Jan 31, 2024
Merged

Server Performance boost #158

merged 5 commits into from
Jan 31, 2024

Conversation

DrParadox7
Copy link
Collaborator

Improves server performance of Fuelwood Heater by:

  • Preventing it from doing unnecessary operations when it has no fuel and no temperature.
  • Reducing fuel value checks of empty container items (this was creating a lot of lag surprisingly).

This is a block that gets spammed by the hundreds for steam generation so these small tweaks go a long way.

should improve performance slightly
@DrParadox7 DrParadox7 assigned DrParadox7 and unassigned maggi373 Jan 25, 2024
@DrParadox7 DrParadox7 force-pushed the Performance-Boost branch 3 times, most recently from c137639 to ff10d5b Compare January 26, 2024 15:06
@DrParadox7 DrParadox7 marked this pull request as draft January 26, 2024 15:53
@DrParadox7 DrParadox7 marked this pull request as ready for review January 31, 2024 14:42
@DrParadox7
Copy link
Collaborator Author

DrParadox7 commented Jan 31, 2024

New changes improve performance on most heating devices.

Why?

Because operations such as:
0.000000000000000000000000000000000000000000000000000000000000000000000000000000199940091390710423 degrees
minus
0.000000000000000000000000000000000000000000000000000000000000000000000000000000011931529084989662
degrees

are not eternally occurring every tick.
Any temperature below 0.01 degrees now defaults to 0 degrees.

Fix Double roundoff from preventing the Heating Machines from reaching 0 degrees resulting in the block constantly ticking.
Improves server performance of Fuelwood Heater by:
- Preventing it from doing unnecessary operations when it has no fuel and no temperature.

- Reducing fuel value checks of empty container items.

This is a block that gets spammed a lot for steam generation so these small tweaks go a long way.

Better non-burnable detection

Saves last invalid ItemStack (no fuel value).
The next operation will only occur with a different stack.

It will no longer attempt to read fuel values of something that cannot be consumed (since no fuel value) more than once.
@maggi373 maggi373 merged commit 04e55af into 1.7.10 Jan 31, 2024
1 check passed
@maggi373 maggi373 deleted the Performance-Boost branch May 25, 2024 23: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