Skip to content

Perf improvement, minimize the impact of parts that are not drawing like groups, proxies, ... - #1481

Merged
thegrb93 merged 1 commit into
CapsAdmin:developfrom
Earu:perf/cached-render-pass-lists
Oct 27, 2026
Merged

thegrb93 merged 1 commit into
CapsAdmin:developfrom
Earu:perf/cached-render-pass-lists

Conversation

@Earu

@Earu Earu commented Oct 25, 2026

Copy link
Copy Markdown

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 as CallRecursive. 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 DrawOrder every frame so the lists get rebuilt every frame, and it's still faster.

I also checked that the old and new paths call OnDraw / OnBuildBonePositions on the exact same parts in the same order across a bunch of tree changes (adding, removing, reparenting, draw order, translucency, hiding, hot reloading parts), and pac_test client gives the same results as on develop.

@Earu

Earu commented Oct 26, 2026

Copy link
Copy Markdown
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?

@thegrb93

Copy link
Copy Markdown
Collaborator

Only your own changes I think. Linter is not important otherwise.

@thegrb93
thegrb93 merged commit 560cf5a into CapsAdmin:develop Oct 27, 2026
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants