Repository navigation
Perf improvement, minimize the impact of parts that are not drawing like groups, proxies, ... - #1481
Merged
Conversation
Author
|
@thegrb93 what should be done about linter failing in this case? All of the warnings are not from my changes, should I still address them? |
Collaborator
|
Only your own changes I think. Linter is not important otherwise. |
thegrb93
approved these changes
Oct 26, 2026
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.
This PR aims to reduce the cost of parts that never draw (events, proxies, groups, sounds etc...) during the render passes. Each root part caches a list of the parts that can actually draw and a list of the parts that build bone positions, and the opaque, translucent, viewmodel, hands and bones go through those instead of the whole tree.
The lists are built from
GetChildrenList(), so the parts get called in the same order asCallRecursive. It skips parts where the call was doing nothing anyway.I gained about 12% fps gain with 8 outfits of ~630 parts that are mostly logic e.g events, proxies, groups etc... With outfits that are mostly models and sprites it's more like 6%. I also tested the worst case where a proxy animates
DrawOrderevery frame so the lists get rebuilt every frame, and it's still faster.I also checked that the old and new paths call
OnDraw/OnBuildBonePositionson the exact same parts in the same order across a bunch of tree changes (adding, removing, reparenting, draw order, translucency, hiding, hot reloading parts), andpac_test clientgives the same results as on develop.