Bugfix: Exempt missions in status yet_to_start from is_complete #83123
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.
Summary
Bugfixes "missions in yet_to_start status should be exempted from is_complete checks"
Purpose of change
While analyzing performance issues for my crafting/sleeping, it showed that almost 70% of CPU was used by the mission:is_complete checks

But heck my character didn't even had any missions. Long stort short, game automatically adds hidden mission
MISSION_LEARN_ABOUT_CATTAIL_JELLY
withMGOAL_CONDITION
type andu_has_item
check. So effectively that does a full inventory iteration every turn.Describe the solution
So why would even check for completeness a mission that hasn't even started? We have another check for yet_to_start type (which would change the mission state to the in_progress status). As soon as those are not checked there is a huge performance boost for every long task

Describe alternatives you've considered
Just removing MISSION_LEARN_ABOUT_CATTAIL_JELLY or modifying it to NOT check for any inventory items should work just as well
Testing
It compiles, it runs...
Additional context
No AI this time, no strange overhaul ideas, will it work this way or am I mistaken again?