perf(runner): host @SGNode test nodes in a persistent offscreen container - #5
Merged
Merged
Conversation
…iner Each node suite created its test node directly on the scene and removed it after, churning the scene's live child list once per suite and rendering every test subtree. Create the nodes inside a single persistent, invisible Group child instead: the scene is no longer re-laid-out per suite, and the invisible subtree is skipped by the render pass. getScene()/m.global still resolve up to the scene, so global-field seeding is unaffected. Verified no behavior change: cbs-roku headless 1675/1 and device cross-check 0 divergent.
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.
What
@SGNodetest nodes were created directly on the scene (testScene.CreateChild) and removed after each suite. With many node suites this churns the scene's live child list once per suite (full re-layout each time) and renders every test subtree.How
Create the nodes inside a single persistent, invisible
Groupchild of the scene, made lazily on the first node test. The scene's direct children no longer change per suite, and the invisible subtree is skipped by the render pass (isVisible()short-circuit).getScene()andm.globalstill resolve up through the container, so global-field seeding and render-thread ownership are unaffected.Idea adapted from rokucommunity#380's offscreen-container concept, isolated from that PR's device-UI changes.
Verified
No behavior change on either lane: cbs-roku full headless suite 1675 pass / 1 fail (unchanged), device
--cross-checkof@SGNodespecs (DynamicLogo, BrandCarousel, Theme) 0 divergent. No wall-clock regression (~87s).