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
Make subsidies scan for town cargo instead of wasting resources and risking desyncs by maintaining cargo caches #8159
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
JGRennison
reviewed
May 18, 2020
ldpl
added a commit
to ldpl/OpenTTD
that referenced
this pull request
May 18, 2020
…ing the savegame version
ldpl
force-pushed
the
remove-town-cargo-accepted
branch
from
May 18, 2020 14:48
e6b254f
to
b0613ce
Compare
ldpl
added a commit
to ldpl/OpenTTD
that referenced
this pull request
May 18, 2020
…ing the savegame version
ldpl
force-pushed
the
remove-town-cargo-accepted
branch
from
May 18, 2020 14:49
b0613ce
to
e6b6d41
Compare
michicc
reviewed
May 18, 2020
ldpl
added a commit
to ldpl/OpenTTD
that referenced
this pull request
May 18, 2020
…ing the savegame version
ldpl
force-pushed
the
remove-town-cargo-accepted
branch
from
May 18, 2020 16:58
e6b6d41
to
6b0f102
Compare
ldpl
added a commit
to ldpl/OpenTTD
that referenced
this pull request
Jun 28, 2020
ldpl
added a commit
to ldpl/OpenTTD
that referenced
this pull request
Jun 28, 2020
…ing the savegame version
ldpl
force-pushed
the
remove-town-cargo-accepted
branch
from
June 28, 2020 16:06
6b0f102
to
6f555ed
Compare
…tead of using desync-prone town caches
…ing the savegame version
ldpl
force-pushed
the
remove-town-cargo-accepted
branch
from
June 28, 2020 16:09
6f555ed
to
097a790
Compare
LordAro
approved these changes
Jun 28, 2020
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
For anyone wondering what happened here xD
|
LordAro
added
the
backport requested
This PR should be backport to current release (RC / stable)
label
Jul 27, 2020
LordAro
pushed a commit
to LordAro/OpenTTD
that referenced
this pull request
Jul 30, 2020
…ing the savegame version
LordAro
pushed a commit
to LordAro/OpenTTD
that referenced
this pull request
Jul 30, 2020
…ing the savegame version
glx22
added
backported
This PR is backported to a current release (RC / stable)
and removed
backport requested
This PR should be backport to current release (RC / stable)
labels
Nov 8, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
As mentioned in #7603 and #8157 there are currently a number of problems with town cargo caches. I also roughly measured the performance of updating them and it contributes about 25%-100% of the total monthly tick lag. Considering they're only used by subsidy generation which only happens once per month with a small chance it makes absolutely no sense to waste so many resources maintaining these caches.
I see 3 possible ways of removing caches:
This PR basically does 2 but is also a partway to 1 or 3 if either of them is chosen in the future.
It's meant to be backported so savegame bump was avoided and a separate PR will be needed to remove the junk from the save in future. And there is almost no harm to zeroing it all as the only possible consequence I see is that there may be fewer subsidies if newer save is loaded in the old game version.