perf: replace all remaining unneeded PlanetData creation instances#1242
Open
OH296 wants to merge 2 commits into
Open
perf: replace all remaining unneeded PlanetData creation instances#1242OH296 wants to merge 2 commits into
OH296 wants to merge 2 commits into
Conversation
Contributor
There was a problem hiding this comment.
1 issue found across 12 files
Confidence score: 1/5
- In
scripts/scr_imperial_navy_functions/scr_imperial_navy_functions.gml, using undefined_orbitinginstead oforbitingcreates a deterministic runtime crash when that path executes, so fleet/star handling can fail immediately in gameplay — rename toorbiting(and run a quick smoke test of the fleet orbit flow) before merging.
Shadow auto-approve: would not auto-approve because issues were found.
Re-trigger cubic
Contributor
There was a problem hiding this comment.
0 issues found across 1 file (changes from recent commits).
Shadow auto-approve: would require human review. This refactor replaces direct PlanetData construction with cached getters across UI and core subsystems. While performance-focused, it risks subtle state/caching bugs and needs human review.
Re-trigger cubic
This file contains hidden or 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
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.
Summary by cubic
Replaced remaining direct
PlanetDataconstructions with cachedget_planet_data(planet)calls across UI, AI, missions, navy/orks, and battle/event paths. Cuts allocations and keeps a single, consistent planet state.new PlanetData(...)forsystem/star.get_planet_data(planet)in combat alarms, star selection, feature UI, enemy AI, events, mission init/complete flows, navy/guard/ork logic, recruit math, and post‑battle handling.target.system_datas[...] = p_data), centralizing lookups to avoid copy divergence.Written for commit 5f37fca. Summary will update on new commits.