refactor(ios): drop the flat sweep's discarded hittable computation - #2684
Merged
Merged
Conversation
Since #2669 the one normalization pass in captureWithBackend recomputes hittable for every acquired node, so the value flatSnapshotNode computed from the reported frame was overwritten before anything read it. The sweep now passes hittable: false like the recursive walker and private AX do, and the viewport parameter that only fed that computation goes with it. No presented output changes. Raised as a non-blocking note on #2669.
Size Report
Startup median (7 runs, lower is better):
|
Member
Author
|
Reviewed at 2463a74. No blocking findings: Not blocking: the three tests named in the PR body do not call |
|
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.
Follow-up to #2669, from the reviewer's non-blocking note there:
flatSnapshotNode(the query-sweep tier) still computedhittablefrom the reported frame, but since #2669 the one normalization pass incaptureWithBackendcallsreplacing(rect:hittable:)on every acquired node, so that value was overwritten before anything read it.What changed
flatSnapshotNodepasseshittable: false, the same placeholder the recursive walker and the private-AX path already pass, and itsviewportparameter (only used by the dropped computation) is gone. The sweep's ownviewportstays: it still sizes the synthetic root and the result.hittableon every node is decided inSnapshotGeometrySpace.normalized, which is unchanged.Validation (
2463a74)AGENT_DEVICE_XCUITEST_INCLUDE_UNIT_TESTS=1, arm64, iOS 26.2);testAbandonedTreeCaptureSkipsQuerySweepAndHonorsWarmupExemption,testRegularDepthCutsPresentationNotAcquisition,testVisibilityFoldKeepsIndependentChildPastClippedParentpass on a throwaway iPhone 17 Pro simulator (3 executed, 0 failures).pnpm check:affected --run --head 2463a74:xctest-selectionandpackaged-runner-swiftpass; the Swift build lanes are GitHub-authoritative.oxlintis clean on the repo (a local, git-ignored.claude/file fails the working-tree lint on my machine; it is not in the diff).hittable.