Perf/Optimize particle tracking and CharacterConfig caching - #8
Open
Haerbin23456 wants to merge 2 commits into
Open
Perf/Optimize particle tracking and CharacterConfig caching#8Haerbin23456 wants to merge 2 commits into
Haerbin23456 wants to merge 2 commits into
Conversation
Haerbin23456
force-pushed
the
perf/defer-particle-tracked-type-checks
branch
2 times, most recently
from
September 7, 2026 03:07
4b7a521 to
47e73b0
Compare
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.
I used Codex to implement these changes. I reviewed all changes and tested them in game.
Overview
This PR contains two performance improvements for high-frequency gameplay paths:
EntityList.Updatecall and perform them only when particle replacement is attempted.SpriteBank.Create/CreateOncompletes, instead of repeatedly checking their resource source inCharacterConfig.For.The intent is to preserve existing behavior while reducing repeated work.
Particle entity tracking
Previously, every entity update checked for
NPC05_BadelineandCS10_HubIntroin order to redirect particle ownership to theirshadoworbooster.These checks are now performed only when particle replacement is actually attempted.
EntityList.Updateonly records the current entity.CharacterConfig caching
For SpriteBank-managed Sprites, SpriteData and resource sources are already known when
Create/CreateOnfinishes.The new implementation updates
SpriteDataCacheand binds CharacterConfig at that point.CharacterConfig.Forcan then normally return the cached binding directly.Ordinary
Imageinstances still use lazy resolution when theirTexturereference changes.CharacterConfig instances remain per-Sprite.
Testing
Manually tested in game with no functional issues observed.